Mercurial > evolve
diff tests/test-evolve-content-divergent-interrupted.t @ 4991:2928f35023a1 stable
evolve: make sure divergence resolution doesn't undo changes (issue6203)
Before this patch, in content-divergence resolution logic if resolution
parent is not the parent of any of the two divergent changesets then
it could undo some changes introduced by previous revs (while resolving
stack of content-divergent changesets) as demonstrated by the test added in
previous patch.
To solve this, what this patch doing is: if divergent cset has obsolete
parent with a successor then first resolve the "orphan" instability of
divergent cset by relocating, then perform the content-divergence resolution.
After this change in logic, I found that it's kind of more correct as
reflected by the changes in tests/test-evolve-content-divergent-corner-cases.t
where it prevented creating conflicts while merging.
Changes in tests/test-evolve-content-divergent-stack.t demonstrate the fixed
behaviour.
Next patches will be covering the `evolve --continue` case for the relocation
of "divergent" cset.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sat, 23 Nov 2019 16:17:04 +0530 |
parents | b6c819facbe8 |
children | 1f92a6aa40d6 308c1e09f80f |
line wrap: on
line diff
--- a/tests/test-evolve-content-divergent-interrupted.t Sat Nov 23 20:25:16 2019 +0530 +++ b/tests/test-evolve-content-divergent-interrupted.t Sat Nov 23 16:17:04 2019 +0530 @@ -195,6 +195,7 @@ merge:[5] added d with: [7] added d base: [4] added d + rebasing "divergent" content-divergent changeset e49523854bc8 on ddcf04e1458c merging d warning: conflicts while merging d! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -203,6 +204,7 @@ [1] $ hg evolve --abort + 1 new orphan changesets 2 new content-divergent changesets evolve aborted working directory is now at 491e10505bae