diff -r e9c2f76be74b -r a1381eea7c7d mercurial/commands.py --- 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