mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
localrepo: refactor repo.branchtip() to use repo.branchmap().branchtip()
This commit is contained in:
parent
b2b08444eb
commit
b351ef136e
@ -671,9 +671,10 @@ class localrepository(object):
|
||||
|
||||
def branchtip(self, branch):
|
||||
'''return the tip node for a given branch'''
|
||||
if branch not in self.branchmap():
|
||||
try:
|
||||
return self.branchmap().branchtip(branch)
|
||||
except KeyError:
|
||||
raise error.RepoLookupError(_("unknown branch '%s'") % branch)
|
||||
return self._branchtip(self.branchmap()[branch])
|
||||
|
||||
def branchtags(self):
|
||||
'''return a dict where branch names map to the tipmost head of
|
||||
|
Loading…
Reference in New Issue
Block a user