# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1516625291 -19800 # Node ID 93bb36b4a666a0f54c2c905c92b607cda4846480 # Parent 1799fc777f30341767f29bb21407e2d6de8fa618 evolve: store the replacements in the evolvestate This will greatly help when we will be implementing `hg evolve --abort`. diff -r 1799fc777f30 -r 93bb36b4a666 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Mon Jan 22 18:13:52 2018 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Mon Jan 22 18:18:11 2018 +0530 @@ -1151,12 +1151,11 @@ # For the progress bar to show count = len(revs) - replacements = {} # Order the revisions if targetcat == 'orphan': revs = _orderrevs(repo, revs) - stateopts = {'category': targetcat} + stateopts = {'category': targetcat, 'replacements': {}} evolvestate.addopts(stateopts) for rev in revs: curctx = repo[rev] @@ -1165,6 +1164,6 @@ progresscb, targetcat) seen += 1 if ret[0]: - replacements[curctx.node()] = [ret[1]] + evolvestate['replacements'][curctx.node()] = [ret[1]] progresscb() _cleanup(ui, repo, startnode, showprogress)