Show More
@@ -59,7 +59,24 b' class BranchMapCache:' | |||
|
59 | 59 | |
|
60 | 60 | def __getitem__(self, repo): |
|
61 | 61 | self.updatecache(repo) |
|
62 |
|
|
|
62 | bcache = self._per_filter[repo.filtername] | |
|
63 | return bcache | |
|
64 | ||
|
65 | def update_disk(self, repo): | |
|
66 | """ensure and up-to-date cache is (or will be) written on disk | |
|
67 | ||
|
68 | The cache for this repository view is updated if needed and written on | |
|
69 | disk. | |
|
70 | ||
|
71 | If a transaction is in progress, the writing is schedule to transaction | |
|
72 | close. See the `BranchMapCache.write_delayed` method. | |
|
73 | ||
|
74 | This method exist independently of __getitem__ as it is sometime useful | |
|
75 | to signal that we have no intend to use the data in memory yet. | |
|
76 | """ | |
|
77 | self.updatecache(repo) | |
|
78 | bcache = self._per_filter[repo.filtername] | |
|
79 | bcache.write(repo) | |
|
63 | 80 | |
|
64 | 81 | def updatecache(self, repo): |
|
65 | 82 | """Update the cache for the given filtered view on a repository""" |
@@ -2973,7 +2973,7 b' class localrepository:' | |||
|
2973 | 2973 | # they're a subset of another kind of cache that *has* been used). |
|
2974 | 2974 | for filt in repoview.filtertable.keys(): |
|
2975 | 2975 | filtered = self.filtered(filt) |
|
2976 |
|
|
|
2976 | self._branchcaches.update_disk(filtered) | |
|
2977 | 2977 | |
|
2978 | 2978 | def invalidatecaches(self): |
|
2979 | 2979 | if '_tagscache' in vars(self): |
General Comments 0
You need to be logged in to leave comments.
Login now