changeset 18396:dd3fd3353e23

destroyed: update `unserved` branchcache instead Before this changesets the `destroyed` function updated the branchcache for unfiltered repository. As seen in a previous changeset, Read only repo does not cares about the unfiltered repo. We now update it for `unserved`.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Tue, 15 Jan 2013 23:33:07 +0100
parents 904b7109938e
children ecf4f79cc600
files mercurial/localrepo.py
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Jan 16 00:09:26 2013 +0100
+++ b/mercurial/localrepo.py	Tue Jan 15 23:33:07 2013 +0100
@@ -1386,11 +1386,6 @@
         changes to stay in memory (waiting for the next unlock), or vanish
         completely.
         '''
-        # It simplifies the logic around updating the branchheads cache if we
-        # only have to consider the effect of the stripped revisions and not
-        # revisions missing because the cache is out-of-date.
-        branchmap.updatecache(self)
-
         # When using the same lock to commit and strip, the phasecache is left
         # dirty after committing. Then when we strip, the repo is invalidated,
         # causing those changes to disappear.
@@ -1421,9 +1416,10 @@
             self._phasecache.filterunknown(self)
             self._phasecache.write()
 
-        # update branchcache information likely invalidated by the strip.
-        # We rely on branchcache collaboration for this call to be fast
-        branchmap.updatecache(self)
+        # update the 'served' branch cache to help read only server process
+        # Thanks to branchcach collaboration this is done from the nearest
+        # filtered subset and it is expected to be fast.
+        branchmap.updatecache(self.filtered('served'))
 
         # Ensure the persistent tag cache is updated.  Doing it now
         # means that the tag cache only has to worry about destroyed