Mercurial > evolve
diff tests/test-evolve-split.t @ 5206:dc3571a37b56 stable
evolve: support ancestor of orphan split with unrelated changeset in between
This is done by searching for roots and heads within the range delimited on
both sides by the target revs instead of just within the target revs.
Example:
o 5
|
o 4
|
o 3
|
| * 2
| |
| x 1
|/
o 0
1 is obsoleted by 3 and 5. We are considering the case when 2 gets evolved.
Before the change, both roots and heads were [3, 5]. The user was offered a
choice between 3 and 5 as the destination.
After the change, roots are [3] and heads are [5]. 5 is chosen as the
destination.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Wed, 11 Mar 2020 16:04:06 +0100 |
parents | 184c64c81528 |
children | a5876853ba15 |
line wrap: on
line diff
--- a/tests/test-evolve-split.t Wed Mar 11 18:50:39 2020 +0100 +++ b/tests/test-evolve-split.t Wed Mar 11 16:04:06 2020 +0100 @@ -59,3 +59,29 @@ $ hg evolve --rev "0::" move:[2] add uu atop:[4] _pp + +Split the changeset such that there's an unrelated changeset in between + $ hg --config extensions.strip= strip 4 -q + $ mkcommit bb + $ printf "pp" > pp; + $ hg add pp + $ hg commit -m "_pp" + $ hg prune --successor "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split + 1 changesets pruned + 1 new orphan changesets + $ hg log -G + @ 5:e4541785761d@default(draft) _pp + | + o 4:155f65ab6abc@default(draft) add bb + | + o 3:a7fdfda64c08@default(draft) _oo + | + | * 2:f52200b086ca@default(draft) add uu + | | + | x 1:d55647aaa0c6@default(draft) oo+pp + |/ + o 0:58663bb03074@default(draft) add aa + + $ hg evolve --rev "0::" + move:[2] add uu + atop:[5] _pp