Mercurial > evolve
comparison tests/test-evolve-split.t @ 5207:a5876853ba15 stable
evolve: support successors of ancestor of orphan with multiple roots
The previous code checked that the set of successors has a single root.
However, there’s no reason to require that in general.
Example:
o 6
|
o 5
|\
| o 4
| |
o | 3
|/
| * 2
| |
| x 1
|/
o 0
1 is obsoleted by 3, 4 and 6. We are considering the case when 2 gets evolved.
The roots are [3, 4] and the heads are [6]. Before the change, the user was
asked which destination to choose, but there was only one choice (6). After the
change, 6 is chosen as the destination.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Wed, 11 Mar 2020 16:05:53 +0100 |
parents | dc3571a37b56 |
children | e0885e2abf59 |
comparison
equal
deleted
inserted
replaced
5206:dc3571a37b56 | 5207:a5876853ba15 |
---|---|
83 o 0:58663bb03074@default(draft) add aa | 83 o 0:58663bb03074@default(draft) add aa |
84 | 84 |
85 $ hg evolve --rev "0::" | 85 $ hg evolve --rev "0::" |
86 move:[2] add uu | 86 move:[2] add uu |
87 atop:[5] _pp | 87 atop:[5] _pp |
88 | |
89 $ cd .. | |
90 $ hg init split-merged | |
91 $ cd split-merged | |
92 $ mkcommit aa | |
93 | |
94 Split the changeset such that the successors don't have a single root | |
95 $ printf "oo" > oo; | |
96 $ printf "pp" > pp; | |
97 $ printf "qq" > qq; | |
98 $ hg add oo pp qq | |
99 $ hg commit -m "oo+pp+qq" | |
100 $ mkcommit uu | |
101 $ hg up 0 | |
102 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
103 $ printf "oo" > oo; | |
104 $ hg add oo | |
105 $ hg commit -m "_oo" | |
106 created new head | |
107 $ hg up 0 | |
108 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
109 $ printf "pp" > pp; | |
110 $ hg add pp | |
111 $ hg commit -m "_pp" | |
112 created new head | |
113 $ hg merge 3 | |
114 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
115 (branch merge, don't forget to commit) | |
116 $ hg ci -m 'merge oo and pp' | |
117 $ printf "qq" > qq; | |
118 $ hg add qq | |
119 $ hg commit -m "_qq" | |
120 $ hg prune --successor "desc(_oo) + desc(_pp) + desc(_qq)" -r "desc('oo+pp+qq')" --split | |
121 1 changesets pruned | |
122 1 new orphan changesets | |
123 $ hg log -G | |
124 @ 6:ea5b1e180c04@default(draft) _qq | |
125 | | |
126 o 5:bf7c32161b4b@default(draft) merge oo and pp | |
127 |\ | |
128 | o 4:ece0aaa22eb7@default(draft) _pp | |
129 | | | |
130 o | 3:a7fdfda64c08@default(draft) _oo | |
131 |/ | |
132 | * 2:cc56c47d84b3@default(draft) add uu | |
133 | | | |
134 | x 1:575a7380a87d@default(draft) oo+pp+qq | |
135 |/ | |
136 o 0:58663bb03074@default(draft) add aa | |
137 | |
138 $ hg evolve --rev "0::" | |
139 move:[2] add uu | |
140 atop:[6] _qq |