Patchwork [2,of,2,evolve-ext-V5] afterresolvehook for evolve --continue

login
register
mail settings
Submitter Shusen LIU
Date Jan. 27, 2016, 12:14 a.m.
Message ID <353420302daf4529e72e.1453853665@dev1221.lla1.facebook.com>
Download mbox | patch
Permalink /patch/12892/
State Deferred
Delegated to: Pierre-Yves David
Headers show

Comments

Shusen LIU - Jan. 27, 2016, 12:14 a.m.
# HG changeset patch
# User Shusen LIU <liushusen@fb.com>
# Date 1453853221 28800
#      Tue Jan 26 16:07:01 2016 -0800
# Node ID 353420302daf4529e72e12725012816a17eef792
# Parent  53915488b7d05a88c09cc807f90f03e9df7efadc
afterresolvehook for evolve --continue

add hook for suggest `hg evolve --continue` when all files resolved, this
behavior is similar to what graft / rebase does.

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -3805,3 +3805,8 @@ 
         tr.close()
     finally:
         release(tr, lock, wlock) # reverse order
+
+@eh.uisetup
+def _setupafterresolvedstateshook(ui):
+    cmdutil.afterresolvedstates.append(
+        ['evolvestate', _('hg evolve --continue')])
diff --git a/tests/test-stabilize-conflict.t b/tests/test-stabilize-conflict.t
--- a/tests/test-stabilize-conflict.t
+++ b/tests/test-stabilize-conflict.t
@@ -165,6 +165,7 @@ 
   $ safesed 's/dix/ten/' babar
   $ hg resolve --all -m
   (no more unresolved files)
+  continue: hg evolve --continue
   $ hg evolve --continue
   evolving 5:71c18f70c34f "babar count up to fifteen"
   $ hg resolve -l
diff --git a/tests/test-stabilize-result.t b/tests/test-stabilize-result.t
--- a/tests/test-stabilize-result.t
+++ b/tests/test-stabilize-result.t
@@ -102,6 +102,7 @@ 
   [255]
   $ hg resolve -m a
   (no more unresolved files)
+  continue: hg evolve --continue
   $ hg evolve --continue
   evolving 5:3655f0f50885 "newer a"