# HG changeset patch # User Greg Ward # Date 1403482207 14400 # Node ID c1f8ece4182dced83ddb6a0d7cbe077d212eb103 # Parent 6a37044ec0b36480c16dcd37e31f62bc7018712b evolve: add --tool option so we don't have to use HGMERGE diff -r 6a37044ec0b3 -r c1f8ece4182d hgext/evolve.py --- 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: diff -r 6a37044ec0b3 -r c1f8ece4182d tests/test-sharing.t --- 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) diff -r 6a37044ec0b3 -r c1f8ece4182d tests/test-stabilize-conflict.t --- 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 < n > EOF move:[8] babar count up to fifteen