evolve: fix default value for --confirm
Before this changes, the default was yes, unlike advertised.
The test were actually catching that so I go them updated.
--- a/hgext/evolve.py Thu Jun 18 18:12:24 2015 -0700
+++ b/hgext/evolve.py Thu Jun 18 18:05:57 2015 -0700
@@ -1376,7 +1376,7 @@
displayer.show(orig)
repo.ui.write(_('atop:'))
displayer.show(target)
- if confirm and ui.prompt('perform evolve? [Ny]') != 'y':
+ if confirm and ui.prompt('perform evolve? [Ny]', 'n') != 'y':
raise util.Abort(_('evolve aborted by user'))
if progresscb: progresscb()
todo = 'hg rebase -r %s -d %s\n' % (orig, target)
@@ -1414,7 +1414,7 @@
displayer.show(bumped)
repo.ui.write(_('atop:'))
displayer.show(prec)
- if confirm and ui.prompt('perform evolve? [Ny]') != 'y':
+ if confirm and ui.prompt('perform evolve? [Ny]', 'n') != 'y':
raise util.Abort(_('evolve aborted by user'))
if dryrun:
todo = 'hg rebase --rev %s --dest %s;\n' % (bumped, prec.p1())
@@ -1544,7 +1544,7 @@
displayer.show(other)
ui.write(_('base: '))
displayer.show(base)
- if confirm and ui.prompt('perform evolve? [Ny]') != 'y':
+ if confirm and ui.prompt('perform evolve? [Ny]', 'n') != 'y':
raise util.Abort(_('evolve aborted by user'))
if dryrun:
ui.write('hg update -c %s &&\n' % divergent)
--- a/tests/test-stabilize-result.t Thu Jun 18 18:12:24 2015 -0700
+++ b/tests/test-stabilize-result.t Thu Jun 18 18:05:57 2015 -0700
@@ -32,6 +32,12 @@
$ hg evolve -v --confirm
move:[2] changea
atop:[4] changea
+ perform evolve? [Ny] n
+ abort: evolve aborted by user
+ [255]
+ $ echo y | hg evolve -v --confirm --config ui.interactive=True
+ move:[2] changea
+ atop:[4] changea
perform evolve? [Ny] y
hg rebase -r cce2c55b8965 -d fb9d051ec0a4
resolving manifests
@@ -162,6 +168,12 @@
$ hg evolve --any --confirm
recreate:[12] newer a
atop:[8] newer a
+ perform evolve? [Ny] n
+ abort: evolve aborted by user
+ [255]
+ $ echo y | hg evolve --any --confirm --config ui.interactive=True
+ recreate:[12] newer a
+ atop:[8] newer a
perform evolve? [Ny] y
rebasing to destination parent: 66719795a494
computing new diff
@@ -236,7 +248,14 @@
Stabilize it
- $ hg evolve -qn --traceback --confirm
+ $ hg evolve -qn --confirm
+ merge:[19] More addition
+ with: [17] More addition
+ base: [15] More addition
+ perform evolve? [Ny] n
+ abort: evolve aborted by user
+ [255]
+ $ echo y | hg evolve -qn --confirm --config ui.interactive=True
merge:[19] More addition
with: [17] More addition
base: [15] More addition