branchcache: introduce a base class for branchmap
This will help define a clear boundary between the two.
--- a/mercurial/branchmap.py Mon Feb 19 12:09:06 2024 +0100
+++ b/mercurial/branchmap.py Sun Feb 25 14:09:36 2024 +0100
@@ -183,7 +183,7 @@
return b'branch cache'
-class branchcache:
+class _BaseBranchCache:
"""A dict like object that hold branches heads cache.
This cache is used to avoid costly computations to determine all the
@@ -652,11 +652,12 @@
self.write(repo)
-class remotebranchcache(branchcache):
- """Branchmap info for a remote connection, should not write locally"""
+class branchcache(_BaseBranchCache):
+ """Branchmap info for a local repo or repoview"""
- def write(self, repo):
- pass
+
+class remotebranchcache(_BaseBranchCache):
+ """Branchmap info for a remote connection, should not write locally"""
# Revision branch info cache