comparison mercurial/localrepo.py @ 6726:e85951aeec6e

tighter default argument selection in localrepo.branchheads()
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Tue, 24 Jun 2008 09:36:24 +0200
parents 197d54d82f8d
children 3e532b97d1e1
comparison
equal deleted inserted replaced
6725:d43707e09b02 6726:e85951aeec6e
1203 heads = [(-self.changelog.rev(h), h) for h in heads] 1203 heads = [(-self.changelog.rev(h), h) for h in heads]
1204 heads.sort() 1204 heads.sort()
1205 return [n for (r, n) in heads] 1205 return [n for (r, n) in heads]
1206 1206
1207 def branchheads(self, branch=None, start=None): 1207 def branchheads(self, branch=None, start=None):
1208 branch = branch or self.workingctx().branch() 1208 branch = branch is None and 'default' or self.workingctx().branch()
1209 branches = self.branchtags() 1209 branches = self.branchtags()
1210 if branch not in branches: 1210 if branch not in branches:
1211 return [] 1211 return []
1212 # The basic algorithm is this: 1212 # The basic algorithm is this:
1213 # 1213 #