Mercurial > hg
changeset 10920:39c69b5dc258
localrepo: simplify _updatebranchcache slightly
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Thu, 15 Apr 2010 17:25:37 +0200 |
parents | 435615a676b0 |
children | fa1f5de99fb2 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Apr 15 15:35:06 2010 +0200 +++ b/mercurial/localrepo.py Thu Apr 15 17:25:37 2010 +0200 @@ -411,9 +411,8 @@ for branch, newnodes in newbranches.iteritems(): bheads = partial.setdefault(branch, []) bheads.extend(newnodes) - if len(bheads) < 2: + if len(bheads) <= 1: continue - newbheads = [] # starting from tip means fewer passes over reachable while newnodes: latest = newnodes.pop() @@ -421,9 +420,8 @@ continue minbhrev = self[min([self[bh].rev() for bh in bheads])].node() reachable = self.changelog.reachable(latest, minbhrev) + reachable.remove(latest) bheads = [b for b in bheads if b not in reachable] - newbheads.insert(0, latest) - bheads.extend(newbheads) partial[branch] = bheads def lookup(self, key):