##// END OF EJS Templates
scmutil: add mustaudit delegation to filtervfs (issue3673)
Bryan O'Sullivan -
r17846:f42cf308 stable
parent child Browse files
Show More
@@ -360,21 +360,21 b' class auditvfs(object):'
360
360
361 mustaudit = property(_getmustaudit, _setmustaudit)
361 mustaudit = property(_getmustaudit, _setmustaudit)
362
362
363 class filtervfs(abstractvfs):
363 class filtervfs(abstractvfs, auditvfs):
364 '''Wrapper vfs for filtering filenames with a function.'''
364 '''Wrapper vfs for filtering filenames with a function.'''
365
365
366 def __init__(self, opener, filter):
366 def __init__(self, vfs, filter):
367 auditvfs.__init__(self, vfs)
367 self._filter = filter
368 self._filter = filter
368 self._orig = opener
369
369
370 def __call__(self, path, *args, **kwargs):
370 def __call__(self, path, *args, **kwargs):
371 return self._orig(self._filter(path), *args, **kwargs)
371 return self.vfs(self._filter(path), *args, **kwargs)
372
372
373 def join(self, path):
373 def join(self, path):
374 if path:
374 if path:
375 return self._orig.join(self._filter(path))
375 return self.vfs.join(self._filter(path))
376 else:
376 else:
377 return self._orig.join(path)
377 return self.vfs.join(path)
378
378
379 filteropener = filtervfs
379 filteropener = filtervfs
380
380
General Comments 0
You need to be logged in to leave comments. Login now