Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
51896:77a9c7d8a7ba | 51897:f0e07efc199f |
---|---|
73 transaction, | 73 transaction, |
74 txnutil, | 74 txnutil, |
75 util, | 75 util, |
76 vfs as vfsmod, | 76 vfs as vfsmod, |
77 wireprototypes, | 77 wireprototypes, |
78 ) | |
79 | |
80 from .branching import ( | |
81 rev_cache as rev_branch_cache, | |
78 ) | 82 ) |
79 | 83 |
80 from .interfaces import ( | 84 from .interfaces import ( |
81 repository, | 85 repository, |
82 util as interfaceutil, | 86 util as interfaceutil, |
2279 return self._branchcaches[self] | 2283 return self._branchcaches[self] |
2280 | 2284 |
2281 @unfilteredmethod | 2285 @unfilteredmethod |
2282 def revbranchcache(self): | 2286 def revbranchcache(self): |
2283 if not self._revbranchcache: | 2287 if not self._revbranchcache: |
2284 self._revbranchcache = branchmap.revbranchcache(self.unfiltered()) | 2288 unfi = self.unfiltered() |
2289 self._revbranchcache = rev_branch_cache.revbranchcache(unfi) | |
2285 return self._revbranchcache | 2290 return self._revbranchcache |
2286 | 2291 |
2287 def register_changeset(self, rev, changelogrevision): | 2292 def register_changeset(self, rev, changelogrevision): |
2288 self.revbranchcache().setdata(rev, changelogrevision) | 2293 self.revbranchcache().setdata(rev, changelogrevision) |
2289 | 2294 |