Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 29899:a9b92164a1f4
commands: remove unecessary copying of list in graft()
author | Hannes Oldenburg <hannes.christian.oldenburg@gmail.com> |
---|---|
date | Mon, 05 Sep 2016 08:29:36 +0000 |
parents | 4c28ddda5d48 |
children | 4d1e6f91f1c7 |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Aug 07 16:36:08 2016 +0900 +++ b/mercurial/commands.py Mon Sep 05 08:29:36 2016 +0000 @@ -4140,9 +4140,7 @@ # 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: