Mercurial > hg
changeset 33534:2715a4fc0684
cachevfs: use the new vfs in when computing branchmap cache
This will help sharing the cache between shares.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sat, 15 Jul 2017 22:42:31 +0200 |
parents | 4133c0b0fcd7 |
children | 755e6532e81d |
files | mercurial/branchmap.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/branchmap.py Sat Jul 15 23:05:04 2017 +0200 +++ b/mercurial/branchmap.py Sat Jul 15 22:42:31 2017 +0200 @@ -28,14 +28,14 @@ def _filename(repo): """name of a branchcache file for a given repo or repoview""" - filename = "cache/branch2" + filename = "branch2" if repo.filtername: filename = '%s-%s' % (filename, repo.filtername) return filename def read(repo): try: - f = repo.vfs(_filename(repo)) + f = repo.cachevfs(_filename(repo)) lines = f.read().split('\n') f.close() except (IOError, OSError): @@ -228,7 +228,7 @@ def write(self, repo): try: - f = repo.vfs(_filename(repo), "w", atomictemp=True) + f = repo.cachevfs(_filename(repo), "w", atomictemp=True) cachekey = [hex(self.tipnode), '%d' % self.tiprev] if self.filteredhash is not None: cachekey.append(hex(self.filteredhash))