[PATCH 2 of 4] Fix up walk and changes code

Toby Dickenson toby at tarind.com
Mon Aug 1 01:08:40 CDT 2005


On Monday 01 Aug 2005 06:49, Thomas Arendsen Hein wrote:
> * Bryan O'Sullivan <bos at serpentine.com> [20050801 04:10]:
> >      (c, a, d, u) = repo.changes(files = files, match = matchfn)
> > -    (c, a, d, u) = map(lambda x: relfilter(repo, x), (c, a, d, u))
> > +    (c, a, d, u) = [map(lambda x: pathto(cwd, x), n) for n in c, a, d,
> > u]
>
> Huh, this looks like apples and pears on a cherry tree :)
>
> These lines can be combined into:
>     (c, a, d, u) = [[pathto(cwd, x) for x in n]
>                     for n in repo.changes(files=files, match=matchfn)]

or all in one pass:

(c, a, d, u) = [pathto(cwd, x) for x in 
 repo.changes(files=files, match=matchfn)]


More information about the Mercurial mailing list