mercurial/branchmap.py
changeset 51448 fd30c4301929
parent 51447 3aba79ce52a9
child 51449 5515876173ba
--- a/mercurial/branchmap.py	Mon Feb 19 11:43:19 2024 +0100
+++ b/mercurial/branchmap.py	Mon Feb 19 11:59:56 2024 +0100
@@ -60,8 +60,8 @@
     def __getitem__(self, repo):
         self.updatecache(repo)
         bcache = self._per_filter[repo.filtername]
-        assert bcache._repo.filtername == repo.filtername, (
-            bcache._repo.filtername,
+        assert bcache._filtername == repo.filtername, (
+            bcache._filtername,
             repo.filtername,
         )
         return bcache
@@ -80,8 +80,8 @@
         """
         self.updatecache(repo)
         bcache = self._per_filter[repo.filtername]
-        assert bcache._repo.filtername == repo.filtername, (
-            bcache._repo.filtername,
+        assert bcache._filtername == repo.filtername, (
+            bcache._filtername,
             repo.filtername,
         )
         bcache.write(repo)
@@ -220,7 +220,7 @@
         """hasnode is a function which can be used to verify whether changelog
         has a given node or not. If it's not provided, we assume that every node
         we have exists in changelog"""
-        self._repo = repo
+        self._filtername = repo.filtername
         self._delayed = False
         if tipnode is None:
             self.tipnode = repo.nullid
@@ -435,8 +435,8 @@
         )
 
     def write(self, repo):
-        assert self._repo.filtername == repo.filtername, (
-            self._repo.filtername,
+        assert self._filtername == repo.filtername, (
+            self._filtername,
             repo.filtername,
         )
         tr = repo.currenttransaction()
@@ -483,8 +483,8 @@
         missing heads, and a generator of nodes that are strictly a superset of
         heads missing, this function updates self to be correct.
         """
-        assert self._repo.filtername == repo.filtername, (
-            self._repo.filtername,
+        assert self._filtername == repo.filtername, (
+            self._filtername,
             repo.filtername,
         )
         starttime = util.timer()