Mercurial > evolve
changeset 3628:170b99a9c0b4
evolve: write data to evolvestate in case on conflicts in phase-divergence
This patch makes phase-divergence resolution write data to evolvestate instead
of graftstate. The `evolve --continue` handling of phase-divergence is broken
which will be done in upcoming patches.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 23 Mar 2018 19:36:08 +0530 |
parents | 31569df48c82 |
children | f23946bf6625 |
files | hgext3rd/evolve/evolvecmd.py tests/test-evolve-phase-divergence.t |
diffstat | 2 files changed, 33 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Fri Mar 23 19:16:25 2018 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Fri Mar 23 19:36:08 2018 +0530 @@ -253,7 +253,8 @@ bumped = tmpctx rebasedbmupdate = _bookmarksupdater(repo, bumped.node(), tr) except MergeFailure: - repo.vfs.write('graftstate', bumped.hex() + '\n') + evolvestate['current'] = bumped.hex() + evolvestate.save() repo.ui.write_err(_('evolution failed!\n')) msg = _("fix conflict and run 'hg evolve --continue'\n") repo.ui.write_err(msg)
--- a/tests/test-evolve-phase-divergence.t Fri Mar 23 19:16:25 2018 +0530 +++ b/tests/test-evolve-phase-divergence.t Fri Mar 23 19:36:08 2018 +0530 @@ -810,12 +810,37 @@ $ echo foo > x -XXX: we should suggest graft --continue here $ hg resolve -m (no more unresolved files) - continue: hg graft --continue + continue: hg evolve --continue + +XXX: we should handle this correctly here, this is not phase-divergence +resolution happening + + $ hg evolve --continue + evolving 19:5fd38c0de46e "added l to l" + working directory is now at 2598cf6ceb65 -XXX: we should handle this correctly here - $ hg evolve --continue - abort: no interrupted evolve to continue - [255] + $ hg glog + @ 20:2598cf6ceb65 added l to l + | () draft + | o 17:f3794e5a91dc added l to l + |/ () public + o 16:8c2bb6fb44e9 phase-divergent update to dc88f5aa9bc9: + | () public + o 12:dc88f5aa9bc9 y to y and foobar to foo + | () public + o 9:2352021b3785 added x to x + | (bm) public + o 8:502e73736632 phase-divergent update to b756eb10ea73: + | () public + o 6:b756eb10ea73 added bar to bar + | () public + o 5:3d62500c673d phase-divergent update to aa071e5554e3: + | () public + o 3:aa071e5554e3 added foo to foo + | () public + o 1:4d1169d82e47 modify a + | () public + o 0:d3873e73d99e init + () public