equal
deleted
inserted
replaced
446 if expandpath: |
446 if expandpath: |
447 base = util.expandpath(base) |
447 base = util.expandpath(base) |
448 if realpath: |
448 if realpath: |
449 base = os.path.realpath(base) |
449 base = os.path.realpath(base) |
450 self.base = base |
450 self.base = base |
451 self._setmustaudit(audit) |
451 self.mustaudit = audit |
452 self.createmode = None |
452 self.createmode = None |
453 self._trustnlink = None |
453 self._trustnlink = None |
454 |
454 |
455 def _getmustaudit(self): |
455 @property |
|
456 def mustaudit(self): |
456 return self._audit |
457 return self._audit |
457 |
458 |
458 def _setmustaudit(self, onoff): |
459 @mustaudit.setter |
|
460 def mustaudit(self, onoff): |
459 self._audit = onoff |
461 self._audit = onoff |
460 if onoff: |
462 if onoff: |
461 self.audit = pathutil.pathauditor(self.base) |
463 self.audit = pathutil.pathauditor(self.base) |
462 else: |
464 else: |
463 self.audit = util.always |
465 self.audit = util.always |
464 |
|
465 mustaudit = property(_getmustaudit, _setmustaudit) |
|
466 |
466 |
467 @util.propertycache |
467 @util.propertycache |
468 def _cansymlink(self): |
468 def _cansymlink(self): |
469 return util.checklink(self.base) |
469 return util.checklink(self.base) |
470 |
470 |
559 |
559 |
560 class auditvfs(object): |
560 class auditvfs(object): |
561 def __init__(self, vfs): |
561 def __init__(self, vfs): |
562 self.vfs = vfs |
562 self.vfs = vfs |
563 |
563 |
564 def _getmustaudit(self): |
564 @property |
|
565 def mustaudit(self): |
565 return self.vfs.mustaudit |
566 return self.vfs.mustaudit |
566 |
567 |
567 def _setmustaudit(self, onoff): |
568 @mustaudit.setter |
|
569 def mustaudit(self, onoff): |
568 self.vfs.mustaudit = onoff |
570 self.vfs.mustaudit = onoff |
569 |
|
570 mustaudit = property(_getmustaudit, _setmustaudit) |
|
571 |
571 |
572 class filtervfs(abstractvfs, auditvfs): |
572 class filtervfs(abstractvfs, auditvfs): |
573 '''Wrapper vfs for filtering filenames with a function.''' |
573 '''Wrapper vfs for filtering filenames with a function.''' |
574 |
574 |
575 def __init__(self, vfs, filter): |
575 def __init__(self, vfs, filter): |