comparison mercurial/commands.py @ 40656:3bc2e550f2bd stable

graft: do not try to skip rev derived from ancestor more than once (issue6024) We check 'x in revs' in other cases, so let's do the same. The test case credits to Tom Prince.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 15 Nov 2018 22:59:38 +0900
parents da2e874fe582
children 1a6bb5a85e30 fbd5e2f0bba7
comparison
equal deleted inserted replaced
40655:69d4c8c5c25e 40656:3bc2e550f2bd
2476 '(%d:%s also has origin %d:%s)\n') 2476 '(%d:%s also has origin %d:%s)\n')
2477 % (ids[n], repo[ids[n]], rev, ctx, r, n[:12])) 2477 % (ids[n], repo[ids[n]], rev, ctx, r, n[:12]))
2478 revs.remove(ids[n]) 2478 revs.remove(ids[n])
2479 elif ctx.hex() in ids: 2479 elif ctx.hex() in ids:
2480 r = ids[ctx.hex()] 2480 r = ids[ctx.hex()]
2481 ui.warn(_('skipping already grafted revision %d:%s ' 2481 if r in revs:
2482 '(was grafted from %d:%s)\n') % 2482 ui.warn(_('skipping already grafted revision %d:%s '
2483 (r, repo[r], rev, ctx)) 2483 '(was grafted from %d:%s)\n') %
2484 revs.remove(r) 2484 (r, repo[r], rev, ctx))
2485 revs.remove(r)
2485 if not revs: 2486 if not revs:
2486 return -1 2487 return -1
2487 2488
2488 if opts.get('no_commit'): 2489 if opts.get('no_commit'):
2489 statedata['no_commit'] = True 2490 statedata['no_commit'] = True