diff mercurial/localrepo.py @ 51897:f0e07efc199f

rev-branch-cache: move the code in a dedicated module The branchmap module is getting huge and the rev branch cache is fully independent, lets move it elsewhere.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 22 Sep 2024 15:55:46 +0200
parents ee7e106b372b
children ff4562ed9ed7
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Sep 25 01:16:47 2024 -0400
+++ b/mercurial/localrepo.py	Sun Sep 22 15:55:46 2024 +0200
@@ -77,6 +77,10 @@
     wireprototypes,
 )
 
+from .branching import (
+    rev_cache as rev_branch_cache,
+)
+
 from .interfaces import (
     repository,
     util as interfaceutil,
@@ -2281,7 +2285,8 @@
     @unfilteredmethod
     def revbranchcache(self):
         if not self._revbranchcache:
-            self._revbranchcache = branchmap.revbranchcache(self.unfiltered())
+            unfi = self.unfiltered()
+            self._revbranchcache = rev_branch_cache.revbranchcache(unfi)
         return self._revbranchcache
 
     def register_changeset(self, rev, changelogrevision):