evolve: add evolve info to cmdutil.afterresolvedstates
authorPulkit Goyal <7895pulkit@gmail.com>
Sat, 27 Jan 2018 21:15:27 +0530
changeset 3472 05bd493d496d
parent 3470 ece5cd58147d
child 3473 b2f591aa4507
evolve: add evolve info to cmdutil.afterresolvedstates Adding evolve info to cmdutil.afterresolvedstate will improve the ui when we run into merge conflicts while evolving. Once we resolve all the conflicts using `hg resolve`, this will show a message saying "continue: hg evolve --continue". Other extensions like rebase and shelve also use it and it's very helpful.
hgext3rd/evolve/__init__.py
tests/test-evolve-phase.t
tests/test-issue-5720.t
tests/test-stabilize-conflict.t
tests/test-stabilize-result.t
--- a/hgext3rd/evolve/__init__.py	Fri Jan 19 19:32:34 2018 +0530
+++ b/hgext3rd/evolve/__init__.py	Sat Jan 27 21:15:27 2018 +0530
@@ -1346,6 +1346,9 @@
             _("use 'hg evolve --continue' or 'hg update -C .' to abort"))
     cmdutil.unfinishedstates.append(data)
 
+    afterresolved = ('evolvestate', _('hg evolve --continue'))
+    cmdutil.afterresolvedstates.append(afterresolved)
+
 @eh.wrapfunction(hg, 'clean')
 def clean(orig, repo, *args, **kwargs):
     ret = orig(repo, *args, **kwargs)
--- a/tests/test-evolve-phase.t	Fri Jan 19 19:32:34 2018 +0530
+++ b/tests/test-evolve-phase.t	Sat Jan 27 21:15:27 2018 +0530
@@ -115,6 +115,7 @@
   $ echo c2 > a
   $ hg resolve -m
   (no more unresolved files)
+  continue: hg evolve --continue
   $ hg evolve -c
   evolving 2:13833940840c "c"
 
--- a/tests/test-issue-5720.t	Fri Jan 19 19:32:34 2018 +0530
+++ b/tests/test-issue-5720.t	Sat Jan 27 21:15:27 2018 +0530
@@ -70,6 +70,7 @@
   $ echo c2 > a
   $ hg resolve -m
   (no more unresolved files)
+  continue: hg evolve --continue
 
 Continue the evolution
   $ hg evolve --continue
--- a/tests/test-stabilize-conflict.t	Fri Jan 19 19:32:34 2018 +0530
+++ b/tests/test-stabilize-conflict.t	Sat Jan 27 21:15:27 2018 +0530
@@ -167,6 +167,7 @@
   $ safesed 's/dix/ten/' babar
   $ hg resolve --all -m
   (no more unresolved files)
+  continue: hg evolve --continue
   $ hg evolve --continue
   evolving 4:71c18f70c34f "babar count up to fifteen"
   $ hg resolve -l
--- a/tests/test-stabilize-result.t	Fri Jan 19 19:32:34 2018 +0530
+++ b/tests/test-stabilize-result.t	Sat Jan 27 21:15:27 2018 +0530
@@ -98,6 +98,7 @@
   [255]
   $ hg resolve -m a
   (no more unresolved files)
+  continue: hg evolve --continue
   $ hg evolve --continue
   evolving 4:3655f0f50885 "newer a"