changeset 20189:1831993d0902

localrepo: refactor repo.branchheads() to use repo.branchmap().branchheads()
author Brodie Rao <brodie@sf.io>
date Mon, 16 Sep 2013 01:08:29 -0700
parents 3a3727829607
children d5d25e541637
files mercurial/localrepo.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
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
@@ -1628,13 +1628,11 @@
         if branch not in branches:
             return []
         # the cache returns heads ordered lowest to highest
-        bheads = list(reversed(branches[branch]))
+        bheads = list(reversed(branches.branchheads(branch, closed=closed)))
         if start is not None:
             # filter out the heads that cannot be reached from startrev
             fbheads = set(self.changelog.nodesbetween([start], bheads)[2])
             bheads = [h for h in bheads if h in fbheads]
-        if not closed:
-            bheads = [h for h in bheads if not self[h].closesbranch()]
         return bheads
 
     def branches(self, nodes):