changeset 986:c1f8ece4182d

evolve: add --tool option so we don't have to use HGMERGE
author Greg Ward <greg@gerg.ca>
date Sun, 22 Jun 2014 20:10:07 -0400
parents 6a37044ec0b3
children 07eef20e36b0
files hgext/evolve.py tests/test-sharing.t tests/test-stabilize-conflict.t
diffstat 3 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py	Sun Jun 22 12:01:11 2014 -0400
+++ b/hgext/evolve.py	Sun Jun 22 20:10:07 2014 -0400
@@ -62,7 +62,7 @@
 from mercurial import scmutil
 from mercurial import templatekw
 from mercurial.i18n import _
-from mercurial.commands import walkopts, commitopts, commitopts2
+from mercurial.commands import walkopts, commitopts, commitopts2, mergetoolopts
 from mercurial.node import nullid
 from mercurial import wireproto
 from mercurial import localrepo
@@ -1151,7 +1151,8 @@
         'do not perform actions, just print what would be done'),
     ('A', 'any', False, 'evolve any troubled changeset'),
     ('a', 'all', False, 'evolve all troubled changesets'),
-    ('c', 'continue', False, 'continue an interrupted evolution'), ],
+    ('c', 'continue', False, 'continue an interrupted evolution'),
+    ] + mergetoolopts,
     _('[OPTIONS]...'))
 def evolve(ui, repo, **opts):
     """Solve trouble in your repository
@@ -1181,6 +1182,7 @@
     anyopt = opts['any']
     allopt = opts['all']
     dryrunopt = opts['dry_run']
+    ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'evolve')
 
     if contopt:
         if anyopt:
--- a/tests/test-sharing.t	Sun Jun 22 12:01:11 2014 -0400
+++ b/tests/test-sharing.t	Sun Jun 22 20:10:07 2014 -0400
@@ -271,7 +271,7 @@
   o  0:0dc9c9f6ab91  public  create new project
   
 Merge the trouble away.
-  $ HGMERGE=internal:local hg merge
+  $ hg merge --tool internal:local
   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ hg commit -m merge
@@ -294,7 +294,7 @@
 
 # XXX hg evolve does not solve this trouble! bug in evolve?
 #Evolve the trouble away.
-#  $ HGMERGE=internal:local hg evolve --all
+#  $ hg evolve --all --tool=internal:local
 #  merge:[5] fix bug 24 (v2 by bob)
 #  with: [6] fix bug 24 (v2 by alice)
 #  base: [3] fix bug 24 (v1)
--- a/tests/test-stabilize-conflict.t	Sun Jun 22 12:01:11 2014 -0400
+++ b/tests/test-stabilize-conflict.t	Sun Jun 22 20:10:07 2014 -0400
@@ -209,7 +209,7 @@
   $ hg amend
   1 new unstable changesets
   $ safesed 's/interactive=.*/interactive=true/' $HGRCPATH
-  $ HGMERGE=touch hg evolve <<EOF
+  $ hg evolve --tool touch <<EOF
   > n
   > EOF
   move:[8] babar count up to fifteen