Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 20195:4274eda143cb
localrepo: remove unused repo.branchtags()/_branchtip() methods
author | Brodie Rao <brodie@sf.io> |
---|---|
date | Mon, 16 Sep 2013 01:08:29 -0700 |
parents | 1831993d0902 |
children | 01bdccfeb9d9 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Sep 16 01:08:29 2013 -0700 +++ b/mercurial/localrepo.py Mon Sep 16 01:08:29 2013 -0700 @@ -659,16 +659,6 @@ branchmap.updatecache(self) return self._branchcaches[self.filtername] - - def _branchtip(self, heads): - '''return the tipmost branch head in heads''' - tip = heads[-1] - for h in reversed(heads): - if not self[h].closesbranch(): - tip = h - break - return tip - def branchtip(self, branch): '''return the tip node for a given branch''' try: @@ -676,14 +666,6 @@ except KeyError: raise error.RepoLookupError(_("unknown branch '%s'") % branch) - def branchtags(self): - '''return a dict where branch names map to the tipmost head of - the branch, open heads come before closed''' - bt = {} - for bn, heads in self.branchmap().iteritems(): - bt[bn] = self._branchtip(heads) - return bt - def lookup(self, key): return self[key].node()