##// END OF EJS Templates
store: eliminate reference cycle in fncachestore...
Simon Heimberg -
r9133:996c1cd8 default
parent child Browse files
Show More
@@ -284,16 +284,17 b' class fncachestore(basicstore):'
284 self.pathjoiner = pathjoiner
284 self.pathjoiner = pathjoiner
285 self.path = self.pathjoiner(path, 'store')
285 self.path = self.pathjoiner(path, 'store')
286 self.createmode = _calcmode(self.path)
286 self.createmode = _calcmode(self.path)
287 self._op = opener(self.path)
287 op = opener(self.path)
288 self._op.createmode = self.createmode
288 op.createmode = self.createmode
289 self.fncache = fncache(self._op)
289 fnc = fncache(op)
290 self.fncache = fnc
290
291
291 def fncacheopener(path, mode='r', *args, **kw):
292 def fncacheopener(path, mode='r', *args, **kw):
292 if (mode not in ('r', 'rb')
293 if (mode not in ('r', 'rb')
293 and path.startswith('data/')
294 and path.startswith('data/')
294 and path not in self.fncache):
295 and path not in fnc):
295 self.fncache.add(path)
296 fnc.add(path)
296 return self._op(hybridencode(path), mode, *args, **kw)
297 return op(hybridencode(path), mode, *args, **kw)
297 self.opener = fncacheopener
298 self.opener = fncacheopener
298
299
299 def join(self, f):
300 def join(self, f):
General Comments 0
You need to be logged in to leave comments. Login now