##// END OF EJS Templates
localrepo: grab mixedrepostorecache class from 526750cdd02d...
marmoute -
r42539:c2b83c95 stable
parent child Browse files
Show More
@@ -122,6 +122,25 b' class storecache(_basefilecache):'
122 122 def join(self, obj, fname):
123 123 return obj.sjoin(fname)
124 124
125 class mixedrepostorecache(_basefilecache):
126 """filecache for a mix files in .hg/store and outside"""
127 def __init__(self, *pathsandlocations):
128 # scmutil.filecache only uses the path for passing back into our
129 # join(), so we can safely pass a list of paths and locations
130 super(mixedrepostorecache, self).__init__(*pathsandlocations)
131 for path, location in pathsandlocations:
132 _cachedfiles.update(pathsandlocations)
133
134 def join(self, obj, fnameandlocation):
135 fname, location = fnameandlocation
136 if location == '':
137 return obj.vfs.join(fname)
138 else:
139 if location != 'store':
140 raise error.ProgrammingError('unexpected location: %s' %
141 location)
142 return obj.sjoin(fname)
143
125 144 def isfilecached(repo, name):
126 145 """check if a repo has already cached "name" filecache-ed property
127 146
General Comments 0
You need to be logged in to leave comments. Login now