# HG changeset patch # User Yuya Nishihara # Date 2020-06-02 11:40:06 # Node ID 2dc5ae953c4a8265578acbe7d3e26c93ec8a08fb # Parent 6d968cd40961b0deda12e1a814a574b0704463ed graft: fix --base value to be saved in state file 'True' just works because it is treated as an integer revision '1' and only the truthiness of the basectx is important. If multiple source revisions were supported with --base, the resumed graft operation would go wrong. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3168,7 +3168,7 @@ def _dograft(ui, repo, *revs, **opts): if opts.get(b'no_commit'): statedata[b'no_commit'] = True if opts.get(b'base'): - statedata[b'base'] = True + statedata[b'base'] = opts[b'base'] for pos, ctx in enumerate(repo.set(b"%ld", revs)): desc = b'%d:%s "%s"' % ( ctx.rev(),