diff mercurial/localrepo.py @ 10771:01f097c4ae66 stable

push: fix bug in prepush logic and its tests
author Sune Foldager <cryo@cyanite.org>
date Fri, 26 Mar 2010 17:02:36 +0100
parents fe39f0160c74
children 1e819576e926
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri Mar 26 17:02:23 2010 +0100
+++ b/mercurial/localrepo.py	Fri Mar 26 17:02:36 2010 +0100
@@ -1575,9 +1575,8 @@
                         localbrheads = self.branchmap()
                     else:
                         localbrheads = {}
-                        for n in heads:
-                            branch = self[n].branch()
-                            localbrheads.setdefault(branch, []).append(n)
+                        ctxgen = (self[n] for n in msng_cl)
+                        self._updatebranchcache(localbrheads, ctxgen)
 
                     newbranches = list(set(localbrheads) - set(remotebrheads))
                     if newbranches: # new branch requires --force