[PATCH] hgext convert : cleaned obsolete loop for putcommit method's processes
Matt Mackall
mpm at selenic.com
Tue Apr 12 14:44:34 CDT 2011
On Tue, 2011-04-12 at 21:41 +0300, Mert Salık wrote:
> # HG changeset patch
> # User mertsalik
> # Date 1302633059 -10800
> # Node ID f3ea272748b6b146ab2e22db6877c6e8405ada71
> # Parent 155d2e17884e2a364ded68657b0185122273bb3c
> hgext convert : cleaned obsolete loop, for putcommit method's processes
> pl list was created and don't used, parents is enough for this method
I don't think this is actually right. See below..
> diff -r 155d2e17884e -r f3ea272748b6 hgext/convert/hg.py
> --- a/hgext/convert/hg.py Pzt Nis 11 10:06:57 2011 +0200
> +++ b/hgext/convert/hg.py Sal Nis 12 21:30:59 2011 +0300
> @@ -140,11 +140,7 @@
> return context.memfilectx(f, data, 'l' in mode, 'x' in mode,
> copies.get(f))
>
> - pl = []
> - for p in parents:
> - if p not in pl:
> - pl.append(p)
> - parents = pl
This looks almost like a list copy, except that it removes duplicates.
Presumably removing duplicates is still significant. This code dates
back to:
http://www.selenic.com/hg/diff/dfc44f3f587c/contrib/convert-repo
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list