# HG changeset patch # User Pierre-Yves David # Date 1358289187 -3600 # Node ID dd3fd3353e233db689c3f4ad4a172010ef0a1be2 # Parent 904b7109938ef67e02dd88a62e335f3a3e252be2 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`. diff -r 904b7109938e -r dd3fd3353e23 mercurial/localrepo.py --- 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