--- a/mercurial/discovery.py Sat Dec 22 01:34:23 2012 +0100
+++ b/mercurial/discovery.py Sat Dec 22 01:44:42 2012 +0100
@@ -193,8 +193,9 @@
# D. Update newmap with outgoing changes.
# This will possibly add new heads and remove existing ones.
- newmap = dict((branch, heads[1]) for branch, heads in headssum.iteritems()
- if heads[0] is not None)
+ newmap = branchmap.branchcache((branch, heads[1])
+ for branch, heads in headssum.iteritems()
+ if heads[0] is not None)
branchmap.update(repo, newmap, missingctx)
for branch, newheads in newmap.iteritems():
headssum[branch][1][:] = newheads