diff mercurial/localrepo.py @ 18305:2502a15e033d

branchmap: pass revision insteads of changectx to the update function Creation of changectx objects is very slow, and they are not very useful. We are going to drop them. The first step is to change the function argument type.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 08 Jan 2013 01:28:39 +0100
parents 679767c38cb5
children cfeab932cff7
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri Jan 11 18:39:43 2013 +0100
+++ b/mercurial/localrepo.py	Tue Jan 08 01:28:39 2013 +0100
@@ -1406,10 +1406,11 @@
         # it, Otherwise, since nodes were destroyed, the cache is stale and this
         # will be caught the next time it is read.
         if newheadnodes:
-            ctxgen = (self[node] for node in newheadnodes
-                      if self.changelog.hasnode(node))
+            cl = self.changelog
+            revgen = (cl.rev(node) for node in newheadnodes
+                      if cl.hasnode(node))
             cache = self._branchcaches[None]
-            cache.update(self, ctxgen)
+            cache.update(self, revgen)
             cache.write(self)
 
         # Ensure the persistent tag cache is updated.  Doing it now