mercurial/branchmap.py
changeset 51454 84fca6d79e25
parent 51453 bb8612053547
child 51455 7a063dd9d64e
equal deleted inserted replaced
51453:bb8612053547 51454:84fca6d79e25
   181         return b'branch cache (%s)' % repo.filtername
   181         return b'branch cache (%s)' % repo.filtername
   182     else:
   182     else:
   183         return b'branch cache'
   183         return b'branch cache'
   184 
   184 
   185 
   185 
   186 class branchcache:
   186 class _BaseBranchCache:
   187     """A dict like object that hold branches heads cache.
   187     """A dict like object that hold branches heads cache.
   188 
   188 
   189     This cache is used to avoid costly computations to determine all the
   189     This cache is used to avoid costly computations to determine all the
   190     branch heads of a repo.
   190     branch heads of a repo.
   191 
   191 
   650         )
   650         )
   651 
   651 
   652         self.write(repo)
   652         self.write(repo)
   653 
   653 
   654 
   654 
   655 class remotebranchcache(branchcache):
   655 class branchcache(_BaseBranchCache):
       
   656     """Branchmap info for a local repo or repoview"""
       
   657 
       
   658 
       
   659 class remotebranchcache(_BaseBranchCache):
   656     """Branchmap info for a remote connection, should not write locally"""
   660     """Branchmap info for a remote connection, should not write locally"""
   657 
       
   658     def write(self, repo):
       
   659         pass
       
   660 
   661 
   661 
   662 
   662 # Revision branch info cache
   663 # Revision branch info cache
   663 
   664 
   664 _rbcversion = b'-v1'
   665 _rbcversion = b'-v1'