[PATCH STABLE] graft: fix --base value to be saved in state file
Yuya Nishihara
yuya at tcha.org
Tue Jun 2 12:37:09 UTC 2020
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1591098006 -32400
# Tue Jun 02 20:40:06 2020 +0900
# Branch stable
# 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(),
More information about the Mercurial-devel
mailing list