Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 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 | 4d6d5ef88538 |
children | 4274eda143cb |
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):