Mercurial > evolve
diff tests/test-evolve-content-divergence.t @ 3810:04fe01b0c0d0
tests: add more test of resolution of content-divergent changesets
This patch adds test of resolution of content-divergent changesets when
relocation is required and it leads to conflicts. The test shows that we are not
doing the right thing. This will be fixed in upcoming patches.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 07 Jun 2018 22:45:54 +0530 |
parents | f06ff8fee2f6 |
children | 3273b178c202 |
line wrap: on
line diff
--- a/tests/test-evolve-content-divergence.t Thu Jun 07 18:18:10 2018 +0530 +++ b/tests/test-evolve-content-divergence.t Thu Jun 07 22:45:54 2018 +0530 @@ -593,3 +593,121 @@ +++ b/y Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ +bar + +Testing when the relocation will result in conflicts and merging wont +---------------------------------------------------------------------- + + $ hg glog + @ 20:bbaca013758a added y + | () [bar] draft + o 14:be41fdcd0ee1 added foo to x + | () [bar] draft + o 9:b6b20b8eefdc added d + | () [default] draft + o 8:7c46f743e62f added c + | () [default] draft + o 5:7ed0642d644b added b + | () [default] draft + o 1:c7586e2a9264 added a + | () [default] draft + o 0:8fa14d15e168 added hgignore + () [default] draft + + $ hg up .^^^^ + 0 files updated, 0 files merged, 4 files removed, 0 files unresolved + + $ echo z > z + $ hg ci -Aqm "added z" + $ hg glog -r . + @ 21:884c9d1a1a84 added z + | () [default] draft + ~ + + $ echo foo > y + $ hg add y + $ hg amend + + $ hg up 884c9d1a1a84 --hidden + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset 884c9d1a1a84 + (hidden revision '884c9d1a1a84' was rewritten as: 3e22a949fe7d) + working directory parent is obsolete! (884c9d1a1a84) + (use 'hg evolve' to update to its successor: 3e22a949fe7d) + $ hg rebase -r . -d bbaca013758a --config experimental.evolution.allowdivergence=True + rebasing 21:884c9d1a1a84 "added z" + 2 new content-divergent changesets + + $ hg glog + @ 23:478a0057fd1a added z + | () [bar] draft + | * 22:3e22a949fe7d added z + | | () [default] draft + o | 20:bbaca013758a added y + | | () [bar] draft + o | 14:be41fdcd0ee1 added foo to x + | | () [bar] draft + o | 9:b6b20b8eefdc added d + | | () [default] draft + o | 8:7c46f743e62f added c + |/ () [default] draft + o 5:7ed0642d644b added b + | () [default] draft + o 1:c7586e2a9264 added a + | () [default] draft + o 0:8fa14d15e168 added hgignore + () [default] draft + + $ hg evolve --content-divergent + merge:[23] added z + with: [22] added z + base: [21] added z + rebasing "other" content-divergent changeset 3e22a949fe7d on bbaca013758a + merging y + warning: conflicts while merging y! (edit, then use 'hg resolve --mark') + abort: unresolved merge conflicts (see hg help resolve) + [255] + + $ hg diff + diff -r bbaca013758a y + --- a/y Thu Jan 01 00:00:00 1970 +0000 + +++ b/y Thu Jan 01 00:00:00 1970 +0000 + @@ -1,1 +1,5 @@ + +<<<<<<< destination: bbaca013758a bar - test: added y + watbar + +======= + +foo + +>>>>>>> evolving: 3e22a949fe7d - test: added z + diff -r bbaca013758a z + --- /dev/null Thu Jan 01 00:00:00 1970 +0000 + +++ b/z Thu Jan 01 00:00:00 1970 +0000 + @@ -0,0 +1,1 @@ + +z + + $ echo foo > y + $ hg resolve -m + (no more unresolved files) + +XXX: wat? + $ hg evolve --continue + abort: no interrupted evolve to continue + [255] + + $ hg glog + * 23:478a0057fd1a added z + | () [bar] draft + | * 22:3e22a949fe7d added z + | | () [default] draft + @ | 20:bbaca013758a added y + | | () [bar] draft + o | 14:be41fdcd0ee1 added foo to x + | | () [bar] draft + o | 9:b6b20b8eefdc added d + | | () [default] draft + o | 8:7c46f743e62f added c + |/ () [default] draft + o 5:7ed0642d644b added b + | () [default] draft + o 1:c7586e2a9264 added a + | () [default] draft + o 0:8fa14d15e168 added hgignore + () [default] draft