##// END OF EJS Templates
localrepo: remove unused repo.branchtags()/_branchtip() methods
Brodie Rao -
r20195:4274eda1 default
parent child Browse files
Show More
@@ -659,16 +659,6 b' class localrepository(object):'
659 branchmap.updatecache(self)
659 branchmap.updatecache(self)
660 return self._branchcaches[self.filtername]
660 return self._branchcaches[self.filtername]
661
661
662
663 def _branchtip(self, heads):
664 '''return the tipmost branch head in heads'''
665 tip = heads[-1]
666 for h in reversed(heads):
667 if not self[h].closesbranch():
668 tip = h
669 break
670 return tip
671
672 def branchtip(self, branch):
662 def branchtip(self, branch):
673 '''return the tip node for a given branch'''
663 '''return the tip node for a given branch'''
674 try:
664 try:
@@ -676,14 +666,6 b' class localrepository(object):'
676 except KeyError:
666 except KeyError:
677 raise error.RepoLookupError(_("unknown branch '%s'") % branch)
667 raise error.RepoLookupError(_("unknown branch '%s'") % branch)
678
668
679 def branchtags(self):
680 '''return a dict where branch names map to the tipmost head of
681 the branch, open heads come before closed'''
682 bt = {}
683 for bn, heads in self.branchmap().iteritems():
684 bt[bn] = self._branchtip(heads)
685 return bt
686
687 def lookup(self, key):
669 def lookup(self, key):
688 return self[key].node()
670 return self[key].node()
689
671
General Comments 0
You need to be logged in to leave comments. Login now