comparison 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
comparison
equal deleted inserted replaced
44793:6d968cd40961 44794:2dc5ae953c4a
3166 return -1 3166 return -1
3167 3167
3168 if opts.get(b'no_commit'): 3168 if opts.get(b'no_commit'):
3169 statedata[b'no_commit'] = True 3169 statedata[b'no_commit'] = True
3170 if opts.get(b'base'): 3170 if opts.get(b'base'):
3171 statedata[b'base'] = True 3171 statedata[b'base'] = opts[b'base']
3172 for pos, ctx in enumerate(repo.set(b"%ld", revs)): 3172 for pos, ctx in enumerate(repo.set(b"%ld", revs)):
3173 desc = b'%d:%s "%s"' % ( 3173 desc = b'%d:%s "%s"' % (
3174 ctx.rev(), 3174 ctx.rev(),
3175 ctx, 3175 ctx,
3176 ctx.description().split(b'\n', 1)[0], 3176 ctx.description().split(b'\n', 1)[0],