Show More
@@ -1232,14 +1232,20 b' class localrepository(object):' | |||
|
1232 | 1232 | return 0 |
|
1233 | 1233 | |
|
1234 | 1234 | @unfilteredmethod |
|
1235 | def updatecaches(self, tr): | |
|
1236 |
"""warm appropriate caches |
|
|
1237 | if tr.hookargs.get('source') == 'strip': | |
|
1235 | def updatecaches(self, tr=None): | |
|
1236 | """warm appropriate caches | |
|
1237 | ||
|
1238 | If this function is called after a transaction closed. The transaction | |
|
1239 | will be available in the 'tr' argument. This can be used to selectively | |
|
1240 | update caches relevant to the changes in that transaction. | |
|
1241 | """ | |
|
1242 | if tr is not None and tr.hookargs.get('source') == 'strip': | |
|
1238 | 1243 | # During strip, many caches are invalid but |
|
1239 | 1244 | # later call to `destroyed` will refresh them. |
|
1240 | 1245 | return |
|
1241 | 1246 | |
|
1242 | if tr.changes['revs']: | |
|
1247 | if tr is None or tr.changes['revs']: | |
|
1248 | # updating the unfiltered branchmap should refresh all the others, | |
|
1243 | 1249 | branchmap.updatecache(self.filtered('served')) |
|
1244 | 1250 | |
|
1245 | 1251 | def invalidatecaches(self): |
@@ -1830,10 +1836,8 b' class localrepository(object):' | |||
|
1830 | 1836 | self._phasecache.filterunknown(self) |
|
1831 | 1837 | self._phasecache.write() |
|
1832 | 1838 | |
|
1833 | # update the 'served' branch cache to help read only server process | |
|
1834 | # Thanks to branchcache collaboration this is done from the nearest | |
|
1835 | # filtered subset and it is expected to be fast. | |
|
1836 | branchmap.updatecache(self.filtered('served')) | |
|
1839 | # refresh all repository caches | |
|
1840 | self.updatecaches() | |
|
1837 | 1841 | |
|
1838 | 1842 | # Ensure the persistent tag cache is updated. Doing it now |
|
1839 | 1843 | # means that the tag cache only has to worry about destroyed |
General Comments 0
You need to be logged in to leave comments.
Login now