Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 1551:e793cbc8be00
Fixes to "hg heads -r FOO":
Make it actually work (undefined variable 'rev'; allow to pass a rev parameter).
repo.branchlookup() doesn't need a copy of heads because it doesn't modify it.
Use None as default argument to heads() instead of nullid.
Doc string PEPification.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 16 Nov 2005 12:56:19 +0100 |
parents | ccb9b62de892 |
children | 59b3639df0a9 |
comparison
equal
deleted
inserted
replaced
1550:ccb9b62de892 | 1551:e793cbc8be00 |
---|---|
611 wlock = self.wlock() | 611 wlock = self.wlock() |
612 if self.dirstate.state(dest) == '?': | 612 if self.dirstate.state(dest) == '?': |
613 self.dirstate.update([dest], "a") | 613 self.dirstate.update([dest], "a") |
614 self.dirstate.copy(source, dest) | 614 self.dirstate.copy(source, dest) |
615 | 615 |
616 def heads(self, start=nullid): | 616 def heads(self, start=None): |
617 heads = self.changelog.heads(start) | 617 heads = self.changelog.heads(start) |
618 # sort the output in rev descending order | 618 # sort the output in rev descending order |
619 heads = [(-self.changelog.rev(h), h) for h in heads] | 619 heads = [(-self.changelog.rev(h), h) for h in heads] |
620 heads.sort() | 620 heads.sort() |
621 return [n for (r, n) in heads] | 621 return [n for (r, n) in heads] |