[PATCH] commands: remove unecessary copying of list in graft()

Yuya Nishihara yuya at tcha.org
Tue Sep 6 11:28:10 EDT 2016


On Tue, 6 Sep 2016 16:01:17 +0100, Ryan McElroy wrote:
> On 9/5/2016 10:59 AM, Hannes Oldenburg wrote:
> > # HG changeset patch
> > # User Hannes Oldenburg <hannes.christian.oldenburg at gmail.com>
> > # Date 1473064176 0
> > #      Mon Sep 05 08:29:36 2016 +0000
> > # Node ID c072f8ecd0021e849360c8ffdcb8a5a973beb01f
> > # Parent  f148bfa40489269be2e48046734f81065129847a
> > commands: remove unecessary copying of list in graft()
> >
> > diff -r f148bfa40489 -r c072f8ecd002 mercurial/commands.py
> > --- a/mercurial/commands.py	Tue Jul 05 09:37:07 2016 +0200
> > +++ b/mercurial/commands.py	Mon Sep 05 08:29:36 2016 +0000
> > @@ -4141,9 +4141,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
> 
> Shouldn't this XXX line also be removed?

I think this comment is still legit. Probably we wouldn't want to convert
'revs' to a list at all.


More information about the Mercurial-devel mailing list