diff -r 435615a676b0 -r 39c69b5dc258 mercurial/localrepo.py --- 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):