--- a/mercurial/commands.py Mon Nov 19 21:12:13 2018 +0300
+++ b/mercurial/commands.py Wed Nov 21 21:40:16 2018 +0900
@@ -2524,10 +2524,11 @@
revs.remove(ids[n])
elif ctx.hex() in ids:
r = ids[ctx.hex()]
- ui.warn(_('skipping already grafted revision %d:%s '
- '(was grafted from %d:%s)\n') %
- (r, repo[r], rev, ctx))
- revs.remove(r)
+ if r in revs:
+ ui.warn(_('skipping already grafted revision %d:%s '
+ '(was grafted from %d:%s)\n') %
+ (r, repo[r], rev, ctx))
+ revs.remove(r)
if not revs:
return -1