mercurial/commands.py
branchstable
changeset 40656 3bc2e550f2bd
parent 40472 da2e874fe582
child 40676 1a6bb5a85e30
child 41020 fbd5e2f0bba7
--- a/mercurial/commands.py	Fri Nov 16 18:37:26 2018 -0500
+++ b/mercurial/commands.py	Thu Nov 15 22:59:38 2018 +0900
@@ -2478,10 +2478,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