[PATCH 1 of 4] store all heads of a branch in the branch cache
Dirkjan Ochtman
dirkjan at ochtman.nl
Mon Jan 12 06:19:50 UTC 2009
On 12/01/2009 02:53, David Soria Parra wrote:
>> + def branchtags(self):
>> + '''return a dict where branch names map to the tipmost head of
>> + the branch'''
>> + return dict([ (k, v[-1]) for (k, v) in self._branchheads().items() ])
>
> Maybe I'm a little pedantic, but I think we usually use
> return dict([(k, v[-1]) for (k, v) in self._branchheads().items()])
> and not
> return dict([ (k, v[-1]) for (k, v) in self._branchheads().items() ])
I do care for that, good catch. Please also use .iteritems() rather than
.items(). It should be faster and is more future-proof.
Cheers,
Dirkjan
More information about the Mercurial-devel
mailing list