Show More
@@ -1413,16 +1413,6 b' class localrepository(object):' | |||||
1413 | code to update the branchheads cache, rather than having future code |
|
1413 | code to update the branchheads cache, rather than having future code | |
1414 | decide it's invalid and regenerating it from scratch. |
|
1414 | decide it's invalid and regenerating it from scratch. | |
1415 | ''' |
|
1415 | ''' | |
1416 | # If we have info, newheadnodes, on how to update the branch cache, do |
|
|||
1417 | # it, Otherwise, since nodes were destroyed, the cache is stale and this |
|
|||
1418 | # will be caught the next time it is read. |
|
|||
1419 | if newheadnodes: |
|
|||
1420 | ctxgen = (self[node] for node in newheadnodes |
|
|||
1421 | if self.changelog.hasnode(node)) |
|
|||
1422 | cache = self._branchcaches[None] |
|
|||
1423 | cache.update(self, ctxgen) |
|
|||
1424 | cache.write(self) |
|
|||
1425 |
|
||||
1426 | # When one tries to: |
|
1416 | # When one tries to: | |
1427 | # 1) destroy nodes thus calling this method (e.g. strip) |
|
1417 | # 1) destroy nodes thus calling this method (e.g. strip) | |
1428 | # 2) use phasecache somewhere (e.g. commit) |
|
1418 | # 2) use phasecache somewhere (e.g. commit) | |
@@ -1435,6 +1425,16 b' class localrepository(object):' | |||||
1435 | self._phasecache.filterunknown(self) |
|
1425 | self._phasecache.filterunknown(self) | |
1436 | self._phasecache.write() |
|
1426 | self._phasecache.write() | |
1437 |
|
1427 | |||
|
1428 | # If we have info, newheadnodes, on how to update the branch cache, do | |||
|
1429 | # it, Otherwise, since nodes were destroyed, the cache is stale and this | |||
|
1430 | # will be caught the next time it is read. | |||
|
1431 | if newheadnodes: | |||
|
1432 | ctxgen = (self[node] for node in newheadnodes | |||
|
1433 | if self.changelog.hasnode(node)) | |||
|
1434 | cache = self._branchcaches[None] | |||
|
1435 | cache.update(self, ctxgen) | |||
|
1436 | cache.write(self) | |||
|
1437 | ||||
1438 | # Ensure the persistent tag cache is updated. Doing it now |
|
1438 | # Ensure the persistent tag cache is updated. Doing it now | |
1439 | # means that the tag cache only has to worry about destroyed |
|
1439 | # means that the tag cache only has to worry about destroyed | |
1440 | # heads immediately after a strip/rollback. That in turn |
|
1440 | # heads immediately after a strip/rollback. That in turn |
General Comments 0
You need to be logged in to leave comments.
Login now