##// END OF EJS Templates
localrepo: store path and vfs location of cached properties...
FUJIWARA Katsunori -
r33277:4470508e default
parent child Browse files
Show More
@@ -66,6 +66,11 b' release = lockmod.release'
66 urlerr = util.urlerr
66 urlerr = util.urlerr
67 urlreq = util.urlreq
67 urlreq = util.urlreq
68
68
69 # set of (path, vfs-location) tuples. vfs-location is:
70 # - 'plain for vfs relative paths
71 # - '' for svfs relative paths
72 _cachedfiles = set()
73
69 class _basefilecache(scmutil.filecache):
74 class _basefilecache(scmutil.filecache):
70 """All filecache usage on repo are done for logic that should be unfiltered
75 """All filecache usage on repo are done for logic that should be unfiltered
71 """
76 """
@@ -80,11 +85,21 b' class _basefilecache(scmutil.filecache):'
80
85
81 class repofilecache(_basefilecache):
86 class repofilecache(_basefilecache):
82 """filecache for files in .hg but outside of .hg/store"""
87 """filecache for files in .hg but outside of .hg/store"""
88 def __init__(self, *paths):
89 super(repofilecache, self).__init__(*paths)
90 for path in paths:
91 _cachedfiles.add((path, 'plain'))
92
83 def join(self, obj, fname):
93 def join(self, obj, fname):
84 return obj.vfs.join(fname)
94 return obj.vfs.join(fname)
85
95
86 class storecache(_basefilecache):
96 class storecache(_basefilecache):
87 """filecache for files in the store"""
97 """filecache for files in the store"""
98 def __init__(self, *paths):
99 super(storecache, self).__init__(*paths)
100 for path in paths:
101 _cachedfiles.add((path, ''))
102
88 def join(self, obj, fname):
103 def join(self, obj, fname):
89 return obj.sjoin(fname)
104 return obj.sjoin(fname)
90
105
General Comments 0
You need to be logged in to leave comments. Login now