diff -r a5d6a609752b -r 8b4a8a9176e2 mercurial/localrepo.py --- a/mercurial/localrepo.py Sat Nov 01 20:00:31 2014 +0100 +++ b/mercurial/localrepo.py Sat Nov 01 17:30:57 2014 -0500 @@ -1680,15 +1680,22 @@ if rbranchmap: rbheads = [] + closed = [] for bheads in rbranchmap.itervalues(): rbheads.extend(bheads) + for h in bheads: + r = self.changelog.rev(h) + b, c = self.changelog.branchinfo(r) + if c: + closed.append(h) if rbheads: rtiprev = max((int(self.changelog.rev(node)) for node in rbheads)) cache = branchmap.branchcache(rbranchmap, self[rtiprev].node(), - rtiprev) + rtiprev, + closednodes=closed) # Try to stick it as low as possible # filter above served are unlikely to be fetch from a clone for candidate in ('base', 'immutable', 'served'):