mercurial/commands.py
branchstable
changeset 21200 a1381eea7c7d
parent 21174 7991df9d2f20
child 21237 0054a77f49df
child 21571 17da326fd041
--- a/mercurial/commands.py	Mon Apr 28 15:09:23 2014 -0700
+++ b/mercurial/commands.py	Mon Apr 28 17:25:36 2014 -0700
@@ -3110,10 +3110,14 @@
     # check for ancestors of dest branch
     crev = repo['.'].rev()
     ancestors = repo.changelog.ancestors([crev], inclusive=True)
+    # Cannot use x.remove(y) on smart set, this has to be a list.
+    # XXX make this lazy in the future
+    revs = list(revs)
     # don't mutate while iterating, create a copy
     for rev in list(revs):
         if rev in ancestors:
             ui.warn(_('skipping ancestor revision %s\n') % rev)
+            # XXX remove on list is slow
             revs.remove(rev)
     if not revs:
         return -1