##// END OF EJS Templates
updatecaches: adds a `caches` parameters to `repo.updatecaches`...
marmoute -
r48077:1337bfaa default
parent child Browse files
Show More
@@ -2732,7 +2732,7 b' class localrepository(object):'
2732 return updater
2732 return updater
2733
2733
2734 @unfilteredmethod
2734 @unfilteredmethod
2735 def updatecaches(self, tr=None, full=False):
2735 def updatecaches(self, tr=None, full=False, caches=None):
2736 """warm appropriate caches
2736 """warm appropriate caches
2737
2737
2738 If this function is called after a transaction closed. The transaction
2738 If this function is called after a transaction closed. The transaction
@@ -2754,13 +2754,14 b' class localrepository(object):'
2754
2754
2755 unfi = self.unfiltered()
2755 unfi = self.unfiltered()
2756
2756
2757 if full:
2757 if caches is None:
2758 caches = repository.CACHES_ALL
2758 if full:
2759 if full == b"post-clone":
2759 caches = repository.CACHES_ALL
2760 caches = caches.copy()
2760 if full == b"post-clone":
2761 caches.discard(repository.CACHE_FILE_NODE_TAGS)
2761 caches = caches.copy()
2762 else:
2762 caches.discard(repository.CACHE_FILE_NODE_TAGS)
2763 caches = repository.CACHES_DEFAULT
2763 else:
2764 caches = repository.CACHES_DEFAULT
2764
2765
2765 if repository.CACHE_BRANCHMAP_SERVED in caches:
2766 if repository.CACHE_BRANCHMAP_SERVED in caches:
2766 if tr is None or tr.changes[b'origrepolen'] < len(self):
2767 if tr is None or tr.changes[b'origrepolen'] < len(self):
General Comments 0
You need to be logged in to leave comments. Login now