[PATCH 1 of 9] Add a repo.lookuplist convenience function

Matt Mackall mpm at selenic.com
Sun Mar 2 16:28:07 CST 2008


On Sun, Mar 02, 2008 at 04:01:23PM -0300, Alexis S. L. Carvalho wrote:
> # HG changeset patch
> # User Alexis S. L. Carvalho <alexis at cecm.usp.br>
> # Date 1204481759 10800
> # Node ID dd43ec3d30cd13f3925bd51006e0e2699f74ad8a
> # Parent  305d4450036a9293eec7b3b057be34fd539f4538
> Add a repo.lookuplist convenience function
> 
> It just calls repo.lookup on every element of a list of revisions
> and returns the results.
> 
...
> -        nodes = [repo.lookup(n) for n in revs]
> +        nodes = repo.lookuplist(revs)
           nodes = map(repo.lookup, revs) # Poor map, much maligned..
           nodes = repo.lookup(revs) # We could detect that revs is a list..

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial-devel mailing list