# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1517163586 -19800 # Node ID 4544067b831bb7f8e2d10a32f9060711a787ddea # Parent 53cd61f7f9c9397cd0195553c63ba2f434208703 evolve: make `hg evolve --continue` respect `--confirm` Previous patch added capability to `hg evolve --continue` to continue the rest of the stack, not just the current revision but that was missing respecting the `--confirm` flag which user passed earlier. This patch makes sure we respect the `--confirm` flag. diff -r 53cd61f7f9c9 -r 4544067b831b hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Wed Jan 24 13:20:18 2018 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Sun Jan 28 23:49:46 2018 +0530 @@ -1146,13 +1146,14 @@ obsolete.createmarkers(repo, [(ctx, (repo['.'],))]) evolvestate['replacements'][ctx.node()] = node category = evolvestate['category'] + confirm = evolvestate['confirm'] unfi = repo.unfiltered() for rev in evolvestate['revs']: # XXX: prevent this lookup by storing nodes instead of revnums curctx = unfi[rev] if curctx.node() not in evolvestate['replacements']: newnode = _solveone(ui, repo, curctx, evolvestate, False, - False, progresscb, category) + confirm, progresscb, category) if newnode[0]: evolvestate['replacements'][curctx.node()] = newnode[1] evolvestate.delete() @@ -1171,7 +1172,8 @@ if targetcat == 'orphan': revs = _orderrevs(repo, revs) - stateopts = {'category': targetcat, 'replacements': {}, 'revs': revs} + stateopts = {'category': targetcat, 'replacements': {}, 'revs': revs, + 'confirm': confirmopt} evolvestate.addopts(stateopts) for rev in revs: curctx = repo[rev] diff -r 53cd61f7f9c9 -r 4544067b831b tests/test-evolve-continue.t --- a/tests/test-evolve-continue.t Wed Jan 24 13:20:18 2018 +0530 +++ b/tests/test-evolve-continue.t Sun Jan 28 23:49:46 2018 +0530 @@ -320,10 +320,13 @@ XXX: this should have asked for confirmation - $ hg evolve --continue + $ hg evolve --continue< y + > EOF evolving 19:981e615b14ca "added g" move:[20] added h atop:[22] added g + perform evolve? [Ny] y $ hg glog @ 23:af6bd002a48d added h