2922 caches = repository.CACHES_DEFAULT |
2922 caches = repository.CACHES_DEFAULT |
2923 |
2923 |
2924 if repository.CACHE_BRANCHMAP_SERVED in caches: |
2924 if repository.CACHE_BRANCHMAP_SERVED in caches: |
2925 if tr is None or tr.changes[b'origrepolen'] < len(self): |
2925 if tr is None or tr.changes[b'origrepolen'] < len(self): |
2926 self.ui.debug(b'updating the branch cache\n') |
2926 self.ui.debug(b'updating the branch cache\n') |
2927 self._branchcaches.update_disk(self.filtered(b'served')) |
2927 dpt = repository.CACHE_BRANCHMAP_DETECT_PURE_TOPO in caches |
2928 self._branchcaches.update_disk(self.filtered(b'served.hidden')) |
2928 served = self.filtered(b'served') |
|
2929 self._branchcaches.update_disk(served, detect_pure_topo=dpt) |
|
2930 served_hidden = self.filtered(b'served.hidden') |
|
2931 self._branchcaches.update_disk( |
|
2932 served_hidden, detect_pure_topo=dpt |
|
2933 ) |
2929 |
2934 |
2930 if repository.CACHE_CHANGELOG_CACHE in caches: |
2935 if repository.CACHE_CHANGELOG_CACHE in caches: |
2931 self.changelog.update_caches(transaction=tr) |
2936 self.changelog.update_caches(transaction=tr) |
2932 |
2937 |
2933 if repository.CACHE_MANIFESTLOG_CACHE in caches: |
2938 if repository.CACHE_MANIFESTLOG_CACHE in caches: |
2966 # The CACHE_BRANCHMAP_ALL updates lazily-loaded caches immediately, |
2971 # The CACHE_BRANCHMAP_ALL updates lazily-loaded caches immediately, |
2967 # so we're forcing a write to cause these caches to be warmed up |
2972 # so we're forcing a write to cause these caches to be warmed up |
2968 # even if they haven't explicitly been requested yet (if they've |
2973 # even if they haven't explicitly been requested yet (if they've |
2969 # never been used by hg, they won't ever have been written, even if |
2974 # never been used by hg, they won't ever have been written, even if |
2970 # they're a subset of another kind of cache that *has* been used). |
2975 # they're a subset of another kind of cache that *has* been used). |
|
2976 dpt = repository.CACHE_BRANCHMAP_DETECT_PURE_TOPO in caches |
|
2977 |
2971 for filt in repoview.filtertable.keys(): |
2978 for filt in repoview.filtertable.keys(): |
2972 filtered = self.filtered(filt) |
2979 filtered = self.filtered(filt) |
2973 self._branchcaches.update_disk(filtered) |
2980 self._branchcaches.update_disk(filtered, detect_pure_topo=dpt) |
2974 |
2981 |
2975 # flush all possibly delayed write. |
2982 # flush all possibly delayed write. |
2976 self._branchcaches.write_dirty(self) |
2983 self._branchcaches.write_dirty(self) |
2977 |
2984 |
2978 def invalidatecaches(self): |
2985 def invalidatecaches(self): |