diff mercurial/commands.py @ 44794:2dc5ae953c4a stable

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.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 02 Jun 2020 20:40:06 +0900
parents e5043679bfcc
children 3d41172f2ac9 61719b9658b1
line wrap: on
line diff
--- a/mercurial/commands.py	Sat May 16 20:38:53 2020 +0200
+++ b/mercurial/commands.py	Tue Jun 02 20:40:06 2020 +0900
@@ -3168,7 +3168,7 @@
     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(),