##// END OF EJS Templates
branchcache: move the filename to a class attribute...
marmoute -
r52353:cebd96de default
parent child Browse files
Show More
@@ -406,6 +406,8 b' class _BaseBranchCache:'
406 class branchcache(_BaseBranchCache):
406 class branchcache(_BaseBranchCache):
407 """Branchmap info for a local repo or repoview"""
407 """Branchmap info for a local repo or repoview"""
408
408
409 _base_filename = b"branch2"
410
409 def __init__(
411 def __init__(
410 self,
412 self,
411 repo: "localrepo.localrepository",
413 repo: "localrepo.localrepository",
@@ -525,10 +527,10 b' class branchcache(_BaseBranchCache):'
525 if state == b'c':
527 if state == b'c':
526 self._closednodes.add(node)
528 self._closednodes.add(node)
527
529
528 @staticmethod
530 @classmethod
529 def _filename(repo):
531 def _filename(cls, repo):
530 """name of a branchcache file for a given repo or repoview"""
532 """name of a branchcache file for a given repo or repoview"""
531 filename = b"branch2"
533 filename = cls._base_filename
532 if repo.filtername:
534 if repo.filtername:
533 filename = b'%s-%s' % (filename, repo.filtername)
535 filename = b'%s-%s' % (filename, repo.filtername)
534 return filename
536 return filename
General Comments 0
You need to be logged in to leave comments. Login now