Patchwork [12,of,12] localrepo: remove unused repo.branchtags()/_branchtip() methods

login
register
mail settings
Submitter Brodie Rao
Date Nov. 16, 2013, 2:27 a.m.
Message ID <c42524dd91a22e36a7cf.1384568864@hit-nxdomain.opendns.com>
Download mbox | patch
Permalink /patch/2970/
State Superseded
Headers show

Comments

Brodie Rao - Nov. 16, 2013, 2:27 a.m.
# HG changeset patch
# User Brodie Rao <brodie@sf.io>
# Date 1379318909 25200
#      Mon Sep 16 01:08:29 2013 -0700
# Node ID c42524dd91a22e36a7cf8bd5cb821480d63c5b18
# Parent  b1295f027f812d0a130e86ced0273014a83ebde5
localrepo: remove unused repo.branchtags()/_branchtip() methods

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -654,16 +654,6 @@  class localrepository(object):
         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:
@@ -671,14 +661,6 @@  class localrepository(object):
         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()