# HG changeset patch # User Pierre-Yves David # Date 1710037970 -3600 # Node ID 54f0dd7983460fe4a551183f6ac629149491d45c # Parent 82c1a388e86a21601645e920ce98aef1ecd6c1c7 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) diff -r 82c1a388e86a -r 54f0dd798346 mercurial/branchmap.py --- 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: