comparison 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
comparison
equal deleted inserted replaced
18304:9b6ae29d4801 18305:2502a15e033d
1404 1404
1405 # If we have info, newheadnodes, on how to update the branch cache, do 1405 # If we have info, newheadnodes, on how to update the branch cache, do
1406 # it, Otherwise, since nodes were destroyed, the cache is stale and this 1406 # it, Otherwise, since nodes were destroyed, the cache is stale and this
1407 # will be caught the next time it is read. 1407 # will be caught the next time it is read.
1408 if newheadnodes: 1408 if newheadnodes:
1409 ctxgen = (self[node] for node in newheadnodes 1409 cl = self.changelog
1410 if self.changelog.hasnode(node)) 1410 revgen = (cl.rev(node) for node in newheadnodes
1411 if cl.hasnode(node))
1411 cache = self._branchcaches[None] 1412 cache = self._branchcaches[None]
1412 cache.update(self, ctxgen) 1413 cache.update(self, revgen)
1413 cache.write(self) 1414 cache.write(self)
1414 1415
1415 # Ensure the persistent tag cache is updated. Doing it now 1416 # Ensure the persistent tag cache is updated. Doing it now
1416 # means that the tag cache only has to worry about destroyed 1417 # means that the tag cache only has to worry about destroyed
1417 # heads immediately after a strip/rollback. That in turn 1418 # heads immediately after a strip/rollback. That in turn