docs/obs-terms.rst
branchstable
changeset 368 c2f3cdd5a2a2
parent 363 5280e7ce026d
child 369 f348088d3b3f
equal deleted inserted replaced
366:c67af39d1ae9 368:c2f3cdd5a2a2
     1 -----------------------------------------------------------
     1 -----------------------------------------------------------
     2 Terminology of the obsolete concept
     2 Terminology of the obsolete concept
     3 -----------------------------------------------------------
     3 -----------------------------------------------------------
     4 
     4 
     5 Obsolete marker them self
     5 Obsolete markers
     6 ---------------------------------
     6 ---------------------------------
     7 
     7 
     8 The mutable concept is based on the creation of **obsolete marker**. An obsolete
     8 The mutable concept is based on **obsolete markers**. Creating an obsolete
     9 marker register a relation between the old obsoleted changeset and its newer
     9 marker registers a relation between an old obsoleted changeset and its newer
    10 version.
    10 version.
    11 
    11 
    12 The old changesets is called **precursors**. Its newer version are called
    12 Old changesets are called **precursors** while their new versions are called
    13 *successors*. A marker always register a single *precursors* but can refer
    13 **successors**. A marker always registers a single *precursor* to:
    14 to:
    14 
    15 
    15 - no *successor*: the *precursor* is just discarded.
    16 - No *successors* at all if the *precursors* if just discarded.
    16 - one *successor*: the *precursor* has been rewritten
    17 - One *successor* at all if the *precursors* have been rewritten
    17 - multiple *successors*: the *precursor* has been splitted in multiple
    18 - Multiple *successors* if the *precursors* have been splitted in myltiple
    18   changesets.
    19   changeset.
    19 
    20 
    20 .. The *precursors* and *successors* terms can be used on changeset directy:
    21 The **precursors** and **successors** terms can be used on changeset directy:
    21 
    22 
    22 .. :precursors: of a changeset `A` are changesets used as *precursors* by
    23 :precursors: of a changeset `A` are changesets used as *precursors* by
    23 ..              obsolete marker using changeset `A` as *successors*
    24              obsolete marker using changeset `A` as *successors*
    24 
    25 
    25 .. :successors: of a changeset `B` are changesets used as *successors* by
    26 :successors: of a changeset `B` are changesets used as *successors* by
    26 ..              obsolete marker using changeset `B` as *precursors*
    27              obsolete marker using changeset `B` as *precursors*
    27 
    28 
    28 Chainning obsolete markers is allowed to rewrite a changeset that is already a
    29 *Precursors* and *successors* directly related within the same marker are called
    29 *successor*. This is a kind of *second order version control*.
    30 **direct precursors** and **direct successors** in ambiguous situation.
    30 To clarify ambiguous situtations one can use **direct precursors** or
    31 
    31 **direct successors** to name changesets that are directly related.
    32 The set of all *obsolete markers* create a direct acyclic graph the same way
    32 
    33 standard *parent* and *children* relation do. In this graph we have:
    33 The set of all **bsolete markers* forms a direct acyclic graph the same way
    34 
    34 standard *parents*/*children* relation does. In this graph we have:
    35 :any precursors: of a `A` are transitive precursors of `A`. (*direct
    35 
    36                  precursors* of `A` and *precursors*  of *precursors*)
    36 :any precursors: are transitive precursors of a changeset: *direct precursors*
    37 
    37                  and *precursors* of *precursors*.
    38 :any successors: of a `A` are transitive successors of `A`. (*direct
    38 
    39                  successors* of `A` and *precursors*  of *precursors*)
    39 :any successors: are transitive successors of a changeset: *direct successors*
    40 
    40                  and *precursors*  of *precursors*)
    41 Obsolete markers may revert to changesets that are not known locally. *Direct
    41 
    42 precursors* of a changeset may be unknown locally. This is why we usually focus
    42 Obsolete markers may refer changesets that are not known locally.
    43 on the **first known precursors**  of changeset
    43 So, *direct precursors* of a changeset may be unknown locally.
    44 
    44 This is why we usually focus on the **first known precursors**  of the rewritten
    45 (The same apply for successors)
    45 changeset. The same apply for *successors*.
    46 
    46 
    47 Item in *Any successors* which are not *obsolete* are called **newest
    47 Changeset in *any successors* which are not **precursor**[#] are called
    48 successors** 
    48 **newest successors**.
    49 
    49 
    50 .. note:: I'm not very happy with this naming scheme and I'm looking for a
    50 .. note:: I'm not very happy with this naming scheme and I'm looking for a
    51           better distinction between direct-successors, any-successors.
    51           better distinction between *direct successors* and **any successors*.
    52 
    52 
    53 Possible changesets "type"
    53 Possible changesets "type"
    54 ---------------------------------
    54 ---------------------------------
    55 
    55 
    56 The following table describe name and behavior of changesets affected by
    56 The following table describes names and behaviors of changesets affected by
    57 obsolete marker. Left column describe generic category and right column are
    57 obsolete markers. Thge left column describes generic categories and the right
    58 about sub-category.
    58 columns are about sub-categories.
    59 
    59 
    60 
    60 
    61 +---------------------+--------------------------+-----------------------------+
    61 +---------------------+--------------------------+-----------------------------+
    62 | **mutable**         | **obsolete**             | **extinct**                 |
    62 | **mutable**         | **obsolete**             | **extinct**                 |
    63 |                     |                          |                             |
    63 |                     |                          |                             |
    64 | Changeset in either | Obsolete changesets are  | Extinct changesets are      |
    64 | Changeset in either | Obsolete changeset is    | *extinct* changeset is      |
    65 | *draft* or *secret* | mutable changeset used   | obsolete one with obsolete  |
    65 | *draft* or *secret* | *mutable* used as a      | *obsolete* which has only   |
    66 | phases.             | as a precursors.         | only descendants.           |
    66 | phase.              | *precursor*.             | *obsolete* descendants.     |
    67 |                     |                          |                             |
    67 |                     |                          |                             |
    68 |                     | A changeset is used as   | They can be safely:         |
    68 |                     | A changeset is used as   | They can safely be:         |
    69 |                     | a precursors when at     |                             |
    69 |                     | a *precursor* when at    |                             |
    70 |                     | least one obsolete       | - hidden in the UI,         |
    70 |                     | least one obsolete       | - hidden in the UI,         |
    71 |                     | refer to it in the       | - silently excluded from pp |
    71 |                     | marker refers to it.     | - silently excluded from    |
    72 |                     | precursors field.        |   pull and push,t operation |
    72 |                     |                          |   pull and push operations  |
    73 |                     |                          | - ignored by most operation |
    73 |                     |                          | - mostly ignored            |
    74 |                     |                          | - garbage collected.        |
    74 |                     |                          | - garbage collected         |
    75 |                     |                          |                             |
    75 |                     |                          |                             |
    76 |                     |                          +-----------------------------+
    76 |                     |                          +-----------------------------+
    77 |                     |                          |                             |
    77 |                     |                          |                             |
    78 |                     |                          | **suspended**               |
    78 |                     |                          | **suspended**               |
    79 |                     |                          |                             |
    79 |                     |                          |                             |
    80 |                     |                          | Suspended changesets are    |
    80 |                     |                          | *suspended* changeset is    |
    81 |                     |                          | obsolete one with at least  |
    81 |                     |                          | *obsolete* with at least    |
    82 |                     |                          | one non-obsolete descendant |
    82 |                     |                          | one non-obsolete descendant |
    83 |                     |                          |                             |
    83 |                     |                          |                             |
    84 |                     |                          | Thoses descendants prevent  |
    84 |                     |                          | Thoses descendants prevent  |
    85 |                     |                          | properties of extincts      |
    85 |                     |                          | properties of extincts      |
    86 |                     |                          | changesets to apply. But    |
    86 |                     |                          | changesets to apply. But    |
    89 |                     |                          |                             |
    89 |                     |                          |                             |
    90 |                     +--------------------------+-----------------------------+
    90 |                     +--------------------------+-----------------------------+
    91 |                     |                          |                             |
    91 |                     |                          |                             |
    92 |                     | **troublesome**          | **unstable**                |
    92 |                     | **troublesome**          | **unstable**                |
    93 |                     |                          |                             |
    93 |                     |                          |                             |
    94 |                     | Troublesome commit have  | Unstable changesets are     |
    94 |                     | *troublesome* has        | *unstable* is a changeset   |
    95 |                     | unresolved issue caused  | changesets with obsolete    |
    95 |                     | unresolved issue caused  | with obsolete ancestors.    |
    96 |                     | by obsolete relations.   | ancestors.                  |
    96 |                     | by *obsolete* relations. |                             |
    97 |                     |                          |                             |
    97 |                     |                          |                             |
    98 |                     | Possible issues are      | They must be rebased on a   |
    98 |                     | Possible issues are      | It must be rebased on a     |
    99 |                     | listed in the next       | better base to solve the    |
    99 |                     | listed in the next       | non *troublesome* base to   |
   100 |                     | column. It is possible   | situation.                  |
   100 |                     | column. It is possible   | solve the problem.          |
   101 |                     | for troublesome          |                             |
   101 |                     | for *troublesome*        |                             |
   102 |                     | changeset to combine     | (possible alternative name: |
   102 |                     | changeset to combine     | (possible alternative name: |
   103 |                     | multiple issue at once.  | precarious)                 |
   103 |                     | multiple issue at once.  | precarious)                 |
   104 |                     | (eg: conflicting and     |                             |
   104 |                     | (a.k.a. conflicting and  |                             |
   105 |                     | unstable)                +-----------------------------+
   105 |                     | unstable)                +-----------------------------+
   106 |                     |                          |                             |
   106 |                     |                          |                             |
   107 |                     | (possible alternative    | **latecomer**               |
   107 |                     | (possible alternative    | **latecomer**               |
   108 |                     | name: unsettled,         |                             |
   108 |                     | names: unsettled,        |                             |
   109 |                     | troubled)                | Latecomer changesets are    |
   109 |                     | troubled)                | *latecomer* is a changeset  |
   110 |                     |                          | changesets that try to      |
   110 |                     |                          | that tries to be successor  |
   111 |                     |                          | be successors of public     |
   111 |                     |                          | of  public changesets.      |
   112 |                     |                          | changesets.                 |
       
   113 |                     |                          |                             |
   112 |                     |                          |                             |
   114 |                     |                          | Public changeset can't      |
   113 |                     |                          | Public changeset can't      |
   115 |                     |                          | be obsolete. Latecomer      |
   114 |                     |                          | be *precursor*. *latecomer* |
   116 |                     |                          | changeset need to be        |
   115 |                     |                          | need to be converted into   |
   117 |                     |                          | rewritten as an overlay     |
   116 |                     |                          | an overlay to this public   |
   118 |                     |                          | to this public changeset.   |
   117 |                     |                          | changeset.                  |
   119 |                     |                          |                             |
   118 |                     |                          |                             |
   120 |                     |                          | (possible alternative names |
   119 |                     |                          | (possible alternative names:|
   121 |                     |                          | mislead, naive, unaware,    |
   120 |                     |                          | mislead, naive, unaware,    |
   122 |                     |                          | mindless, disenchanting)    |
   121 |                     |                          | mindless, disenchanting)    |
   123 |                     |                          |                             |
   122 |                     |                          |                             |
   124 |                     |                          +-----------------------------+
   123 |                     |                          +-----------------------------+
   125 |                     |                          | **conflicting**             |
   124 |                     |                          | **conflicting**             |
   126 |                     |                          |                             |
   125 |                     |                          |                             |
   127 |                     |                          | Conflicting changesets      |
   126 |                     |                          | *conflicting* is changeset  |
   128 |                     |                          | happen when multiple        |
   127 |                     |                          | that appears when multiple  |
   129 |                     |                          | changesets are successors   |
   128 |                     |                          | changesets are successors   |
   130 |                     |                          | of the same obsolete        |
   129 |                     |                          | of the same precursor.      |
   131 |                     |                          | changeset.                  |
   130 |                     |                          |                             |
   132 |                     |                          |                             |
   131 |                     |                          | *conflicting* are solved    |
   133 |                     |                          | Conflicting changesets are  |
   132 |                     |                          | through a three ways merge  |
   134 |                     |                          | resolve through a three     |
   133 |                     |                          | between the two             |
   135 |                     |                          | ways merging between the    |
   134 |                     |                          | *conflictings*,             |
   136 |                     |                          | two conflicting changesets, |
       
   137 |                     |                          | using the last "obsolete-   |
   135 |                     |                          | using the last "obsolete-   |
   138 |                     |                          | -common-ancestor" as the    |
   136 |                     |                          | -common-ancestor" as the    |
   139 |                     |                          | base.                       |
   137 |                     |                          | base.                       |
   140 |                     |                          |                             |
   138 |                     |                          |                             |
   141 |                     |                          | (Changeset splitting is     |
   139 |                     |                          | (*splitting* is             |
   142 |                     |                          | properly not detected as a  |
   140 |                     |                          | properly not detected as a  |
   143 |                     |                          | conflict)                   |
   141 |                     |                          | conflict)                   |
   144 |                     |                          |                             |
   142 |                     |                          |                             |
   145 |                     +--------------------------+-----------------------------+
   143 |                     +--------------------------+-----------------------------+
   146 |                     |                                                        |
   144 |                     |                                                        |
   161 | Changesets in the *public* phases.                                           |
   159 | Changesets in the *public* phases.                                           |
   162 |                                                                              |
   160 |                                                                              |
   163 | Rewriting operation refuse to work on immutable changeset.                   |
   161 | Rewriting operation refuse to work on immutable changeset.                   |
   164 |                                                                              |
   162 |                                                                              |
   165 | Obsolete markers that refer an immutable changeset as precursors have        |
   163 | Obsolete markers that refer an immutable changeset as precursors have        |
   166 | no effect on the precussors changeset (but may have effect on the            |
   164 | no effect on the precussors but may have effect on the successors.           |
   167 | successors)                                                                  |
   165 |                                                                              |
   168 |                                                                              |
   166 | When a *mutable* changeset becomes *immutable* (changing its phase from draft|
   169 | When a mutable changeset becomes immutable its is just *immutable* and loose |
   167 | to public) it is just *immutable* and loose any property of it's former      |
   170 | any property of it's former state.                                           |
   168 | state.                                                                       |
   171 |                                                                              |
   169 |                                                                              |
   172 | By phase property, once a changeset becomes a public immutable changeset,    |
   170 | The phase properties says that public changesets stay as *immutable* forever.|
   173 | you can expect it to remain as such forever.                                 |
       
   174 |                                                                              |
   171 |                                                                              |
   175 +------------------------------------------------------------------------------+
   172 +------------------------------------------------------------------------------+
   176 
   173 
   177 .. note:: I'm not very happy with the naming of:
   174 .. note:: I'm not very happy with the naming of:
   178 
   175 
   188 
   185 
   189 
   186 
   190 Existing terms
   187 Existing terms
   191 ``````````````
   188 ``````````````
   192 
   189 
   193 Mercurial already use the following terms:
   190 Mercurial already uses the following terms:
   194 
   191 
   195 :amend: rewrite a changeset
   192 :amend: to rewrite a changeset
   196 :graft: copy a changeset
   193 :graft: to copy a changeset
   197 :rebase: move a changeset
   194 :rebase: to move a changeset
   198 
   195 
   199 
   196 
   200 Uncommit
   197 Uncommit
   201 `````````````
   198 `````````````
   202 
   199 
   203 remove files from a commit (and leave them as dirty in the working directory)
   200 Remove files from a commit (and leave them as dirty in the working directory)
   204 
   201 
   205 The evolve extension have an `uncommit` command that aims to replace most
   202 The *evolve* extension have an `uncommit` command that aims to replace most
   206 `rollback` usage.
   203 `rollback` usage.
   207 
   204 
   208 Fold
   205 Fold
   209 ``````````
   206 ``````````
   210 
   207 
   211 Collapse multiple changeset into one
   208 Collapse multiple changesets into a uniq one.
   212 
   209 
   213 The evolve extensions *will* have a `fold` commands
   210 The *evolve* extension will have a `fold` command.
   214 
   211 
   215 Prune
   212 Prune
   216 ``````````
   213 ``````````
   217 
   214 
   218 Make a changeset obsolete without successors.
   215 Make a changeset obsolete without successors.
   219 
   216 
   220 This an important operation as it should replace strip in 95% of the case.
   217 This an important operation as it should mostly replace *strip*.
   221 
   218 
   222 alternative name:
   219 Alternative names:
   223 
   220 
   224 - kill: nice name for effect when you forget the "hg" in front on "hg kill".
   221 - kill: shall has funny effects when you forget "hg" in front of ``hg kill``.
   225 - obsolete: too vague, long and generic.
   222 - obsolete: too vague, too long and too generic.
   226 
   223 
   227 Stabilize
   224 Stabilize
   228 ```````````````
   225 ```````````````
   229 
   226 
   230 Automatically resolve troublesome changesets
   227 Automatically resolve *troublesome* changesets
   231 (unstable, latecomer and conflicting)
   228 (*unstable*, *latecomer* and *conflicting*)
   232 
   229 
   233 This is an important name as hg pull/pussh will suggest it the same way it
   230 This is an important name as hg pull/push will suggest it the same way it
   234 suggest merging when you add heads.
   231 suggest merging when you add heads.
   235 
   232 
   236 I do not like stabilize much.
   233 I do not like stabilize much.
   237 
   234 
   238 alternative name:
   235 alternative names:
   239 
   236 
   240 - solve (too generic ?)
   237 - solve (too generic ?)
   241 - evolve (too vague)
   238 - evolve (too vague)
   242 
       
   243 
       
   244 
   239 
   245 
   240 
   246 
   241 
   247 .. note:: I'm not very happy with the naming of:
   242 .. note:: I'm not very happy with the naming of:
   248 
   243