90 |
90 |
91 (If you prefer a calculus metaphor to set theory, it might help to |
91 (If you prefer a calculus metaphor to set theory, it might help to |
92 think of the traditional parent/child DAG as the first derivative of |
92 think of the traditional parent/child DAG as the first derivative of |
93 your source code, and the obsolescence DAG as the second derivative.) |
93 your source code, and the obsolescence DAG as the second derivative.) |
94 |
94 |
95 Troubled changesets (unstable, bumped, divergent) |
95 Troubled changesets (orphan, bumped, divergent) |
96 ------------------------------------------------- |
96 ----------------------------------------------- |
97 |
97 |
98 Evolving history can introduce problems that need to be solved. For |
98 Evolving history can introduce problems that need to be solved. For |
99 example, if you prune a changeset *P* but not its descendants, those |
99 example, if you prune a changeset *P* but not its descendants, those |
100 descendants are now on thin ice. To push a changeset to another |
100 descendants are now on thin ice. To push a changeset to another |
101 repository *R*, all of its ancestors must be present in *R* or pushed |
101 repository *R*, all of its ancestors must be present in *R* or pushed |
102 at the same time. But Mercurial does not push obsolete changesets like |
102 at the same time. But Mercurial does not push obsolete changesets like |
103 *P*, so it cannot push the descendants of *P*. Any non-obsolete |
103 *P*, so it cannot push the descendants of *P*. Any non-obsolete |
104 changeset that is a descendant of an obsolete changeset is said to be |
104 changeset that is a descendant of an obsolete changeset is said to be |
105 *unstable*. |
105 an *orphan*. |
106 |
106 |
107 [diagram: obsolete cset with non-obsolete descendant] |
107 [diagram: obsolete cset with non-obsolete descendant] |
108 |
108 |
109 Another sort of trouble occurs when two developers, Alice and Bob, |
109 Another sort of trouble occurs when two developers, Alice and Bob, |
110 collaborate via a shared non-publishing repository. (This is how |
110 collaborate via a shared non-publishing repository. (This is how |
130 The third sort of trouble is when Alice and Bob both amend the same |
130 The third sort of trouble is when Alice and Bob both amend the same |
131 changeset *C* to have different successors. When this happens, the |
131 changeset *C* to have different successors. When this happens, the |
132 successors are both called *divergent* (unless one of them is in |
132 successors are both called *divergent* (unless one of them is in |
133 public phase; only mutable changesets are divergent). |
133 public phase; only mutable changesets are divergent). |
134 |
134 |
135 The collective term for unstable, bumped, and divergent changeset is |
135 The collective term for orphan, bumped, and divergent changeset is |
136 *troubled*:: |
136 *troubled*:: |
137 |
137 |
138 troubled = unstable ∪ bumped ∪ divergent |
138 troubled = orphan ∪ bumped ∪ divergent |
139 |
139 |
140 It is possible for a changeset to be in any of the troubled categories |
140 It is possible for a changeset to be in any of the troubled categories |
141 at the same time: it might be unstable and divergent, or bumped and |
141 at the same time: it might be an orphan and divergent, or bumped and |
142 divergent, or whatever. |
142 divergent, or whatever. |
143 |
143 |
144 [diagram: Venn diagram of troubled changesets, showing overlap] |
144 [diagram: Venn diagram of troubled changesets, showing overlap] |
145 |
145 |
146 The presence of troubled changesets indicates the need to run ``hg |
146 The presence of troubled changesets indicates the need to run ``hg |