Mercurial > hg-stable
changeset 51519:84fca6d79e25
branchcache: introduce a base class for branchmap
This will help define a clear boundary between the two.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 25 Feb 2024 14:09:36 +0100 |
parents | bb8612053547 |
children | 7a063dd9d64e |
files | mercurial/branchmap.py |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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