comparison mercurial/store.py @ 17725:ffd589d4b785

vfs: define "join()" in each classes derived from "abstractvfs" This patch defines "join()" in each classes derived from "abstractvfs" except "vfs", which already defines it. This allows all vfs instances to be used for indirect file API invocation.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Tue, 09 Oct 2012 01:41:55 +0900
parents bf4b72d8dd4d
children 7cb7e17c23b2
comparison
equal deleted inserted replaced
17724:bf4b72d8dd4d 17725:ffd589d4b785
439 def __call__(self, path, mode='r', *args, **kw): 439 def __call__(self, path, mode='r', *args, **kw):
440 if mode not in ('r', 'rb') and path.startswith('data/'): 440 if mode not in ('r', 'rb') and path.startswith('data/'):
441 self.fncache.add(path) 441 self.fncache.add(path)
442 return self.vfs(self.encode(path), mode, *args, **kw) 442 return self.vfs(self.encode(path), mode, *args, **kw)
443 443
444 def join(self, path):
445 if path:
446 return self.vfs.join(self.encode(path))
447 else:
448 return self.vfs.join(path)
449
444 class fncachestore(basicstore): 450 class fncachestore(basicstore):
445 def __init__(self, path, vfstype, dotencode): 451 def __init__(self, path, vfstype, dotencode):
446 if dotencode: 452 if dotencode:
447 encode = _dothybridencode 453 encode = _dothybridencode
448 else: 454 else: