docs/obs-concept.rst
changeset 163 92b073d13f2d
parent 161 4e3f25ba5401
child 166 8f8a52cd0b9f
equal deleted inserted replaced
162:1a6ae8d8f104 163:92b073d13f2d
    33 This simple rules allows to express any possible history rewriting operation:
    33 This simple rules allows to express any possible history rewriting operation:
    34 
    34 
    35 
    35 
    36 
    36 
    37 
    37 
    38 .. figure:: ./figures/example-1-update.png
    38 .. figure:: ./figures/example-1-update.*
    39 
    39 
    40     *Updating* a changeset
    40     *Updating* a changeset
    41 
    41 
    42     Create one obsolete marker: ``([A'] obsolete A)``
    42     Create one obsolete marker: ``([A'] obsolete A)``
    43 
    43 
    44 
    44 
    45 
    45 
    46 .. figure:: ./figures/example-2-split.png
    46 .. figure:: ./figures/example-2-split.*
    47 
    47 
    48     *Splitting* a changeset in multiple one
    48     *Splitting* a changeset in multiple one
    49 
    49 
    50     Create one obsolete marker ``([B1, B2] obsolete B)]``
    50     Create one obsolete marker ``([B1, B2] obsolete B)]``
    51 
    51 
    52 
    52 
    53 .. figure:: ./figures/example-3-merge.png
    53 .. figure:: ./figures/example-3-merge.*
    54 
    54 
    55     *Merging* multiple changeset in a single one
    55     *Merging* multiple changeset in a single one
    56 
    56 
    57     Create two obsolete markers ``([C] obsolete A), ([C] obsolete B)``
    57     Create two obsolete markers ``([C] obsolete A), ([C] obsolete B)``
    58 
    58 
    59 .. figure:: ./figures/example-4-reorder.png
    59 .. figure:: ./figures/example-4-reorder.*
    60 
    60 
    61     *Moving* changeset around
    61     *Moving* changeset around
    62 
    62 
    63     Reordering those two changesets need two obsolete markers:
    63     Reordering those two changesets need two obsolete markers:
    64     ``([A'] obsolete A), ([B'] obsolete B)``
    64     ``([A'] obsolete A), ([B'] obsolete B)``
    65 
    65 
    66 
    66 
    67 
    67 
    68 .. figure:: ./figures/example-5-delete.png
    68 .. figure:: ./figures/example-5-delete.*
    69 
    69 
    70     *Removing* a changeset:
    70     *Removing* a changeset:
    71 
    71 
    72     One obselete marker ``([] obsolete B)``
    72     One obselete marker ``([] obsolete B)``
    73 
    73 
   120 Old changesets left behind by obsolete operation are said **obsolete**.
   120 Old changesets left behind by obsolete operation are said **obsolete**.
   121 
   121 
   122 With current version of mercurial, this *obsolete* part is stripped from the
   122 With current version of mercurial, this *obsolete* part is stripped from the
   123 repository before the end of every rewritting operation.
   123 repository before the end of every rewritting operation.
   124 
   124 
   125 .. figure:: ./figures/error-obsolete.png
   125 .. figure:: ./figures/error-obsolete.*
   126 
   126 
   127     Rebasing `B` and `C` on `A` (as `B'`, `C'`)
   127     Rebasing `B` and `C` on `A` (as `B'`, `C'`)
   128 
   128 
   129     This rebase operation added two obsolete markers from new changesets to old
   129     This rebase operation added two obsolete markers from new changesets to old
   130     changesets. These Two old changesets are now part of the *obsolete* part of the
   130     changesets. These Two old changesets are now part of the *obsolete* part of the
   146 * Use a partial rewriting operation. For example amend on a changeset with
   146 * Use a partial rewriting operation. For example amend on a changeset with
   147   childrens.
   147   childrens.
   148 
   148 
   149 *Non-obsolete* changeset based on *obsolete* one are said **unstable**
   149 *Non-obsolete* changeset based on *obsolete* one are said **unstable**
   150 
   150 
   151 .. figure:: ./figures/error-unstable.png
   151 .. figure:: ./figures/error-unstable.*
   152 
   152 
   153     Amend `A` into `A'` leaving `B` behind.
   153     Amend `A` into `A'` leaving `B` behind.
   154 
   154 
   155     In this situation we can not consider `B` as *obsolete*.  But we have all
   155     In this situation we can not consider `B` as *obsolete*.  But we have all
   156     necessary data to detect `B` as an *unstable* branch of the history because
   156     necessary data to detect `B` as an *unstable* branch of the history because
   185 * *obsolete* changeset with no or *obsolete* only descendants, said **extinct**.
   185 * *obsolete* changeset with no or *obsolete* only descendants, said **extinct**.
   186 
   186 
   187 * *obsolete* changeset with *unstable* descendants, said **suspended**.
   187 * *obsolete* changeset with *unstable* descendants, said **suspended**.
   188 
   188 
   189 
   189 
   190 .. figure:: ./figures/error-extinct.png
   190 .. figure:: ./figures/error-extinct.*
   191 
   191 
   192     Amend `A` and `C` leaving `B` behind.
   192     Amend `A` and `C` leaving `B` behind.
   193 
   193 
   194     In this example we have two *obsolete* changesets: `C` with no *unstable*
   194     In this example we have two *obsolete* changesets: `C` with no *unstable*
   195     children is *extinct*. `A` with *unstable* descendant (`B`) is *suspended*.
   195     children is *extinct*. `A` with *unstable* descendant (`B`) is *suspended*.
   208 If people start to concurrently edit the same part of the history they will
   208 If people start to concurrently edit the same part of the history they will
   209 likely meet conflicting situation when a changeset have been rewritten in two
   209 likely meet conflicting situation when a changeset have been rewritten in two
   210 different versions.
   210 different versions.
   211 
   211 
   212 
   212 
   213 .. figure:: ./figures/error-conflicting.png
   213 .. figure:: ./figures/error-conflicting.*
   214 
   214 
   215     Conflicting rewriting of `A` into `A'` and `A''`
   215     Conflicting rewriting of `A` into `A'` and `A''`
   216 
   216 
   217 This kind of conflict is easy to detect with obsolete marker because an obsolete
   217 This kind of conflict is easy to detect with obsolete marker because an obsolete
   218 changeset have more than one new version. It may be seen as the multiple heads
   218 changeset have more than one new version. It may be seen as the multiple heads