graft: fix duplicate filter logic stable
authorMatt Mackall <mpm@selenic.com>
Mon, 24 Oct 2011 16:57:14 -0500
branchstable
changeset 15360 73628b32d0c0
parent 15359 a5a8adf95e51
child 15361 c1930992e111
graft: fix duplicate filter logic
mercurial/commands.py
--- a/mercurial/commands.py	Mon Oct 24 16:57:14 2011 -0500
+++ b/mercurial/commands.py	Mon Oct 24 16:57:14 2011 -0500
@@ -2553,8 +2553,9 @@
         n = ctx.extra().get('source')
         if n and n in repo:
             r = repo[n].rev()
-            ui.warn(_('skipping already grafted revision %s\n') % r)
-            revs.remove(r)
+            if r in revs:
+                ui.warn(_('skipping already grafted revision %s\n') % r)
+                revs.remove(r)
     if not revs:
         return -1