mercurial/commands.py
changeset 40715 1a6bb5a85e30
parent 40628 ef694e477783
parent 40441 3bc2e550f2bd
child 40725 9b8d1ad851f8
--- 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