changeset 51555:54f0dd798346

branchcache: do not use `__getitem__` in updatecache The `update_disk` method uses `updatecache` and the point of `update_disk` is to be able to do alternative processing to the one we do in `__getitem__`. So we calling `__getitem__` in `updatecache` defeat this purpose. Instead we do the equivalent explicitly to preserve the spirit of `update_disk` (that we will actually put to use soon, I promise)
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 10 Mar 2024 03:32:50 +0100
parents 82c1a388e86a
children 0c684ca692a4
files mercurial/branchmap.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/branchmap.py	Sun Mar 10 05:10:00 2024 +0100
+++ b/mercurial/branchmap.py	Sun Mar 10 03:32:50 2024 +0100
@@ -108,7 +108,8 @@
             subsetname = subsettable.get(filtername)
             if subsetname is not None:
                 subset = repo.filtered(subsetname)
-                bcache = self[subset].inherit_for(repo)
+                self.updatecache(subset)
+                bcache = self._per_filter[subset.filtername].inherit_for(repo)
                 extrarevs = subset.changelog.filteredrevs - cl.filteredrevs
                 revs.extend(r for r in extrarevs if r <= bcache.tiprev)
             else: