# HG changeset patch # User Brodie Rao # Date 1379318909 25200 # Node ID 1831993d090249b591251fb9aad35fab8161d928 # Parent 3a37278296073cbe0585f3ffc29c42b4cbf563fc localrepo: refactor repo.branchheads() to use repo.branchmap().branchheads() diff -r 3a3727829607 -r 1831993d0902 mercurial/localrepo.py --- 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):