comparison mercurial/scmutil.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 ab23768746fd
children 7cb7e17c23b2
comparison
equal deleted inserted replaced
17724:bf4b72d8dd4d 17725:ffd589d4b785
344 self._filter = filter 344 self._filter = filter
345 self._orig = opener 345 self._orig = opener
346 346
347 def __call__(self, path, *args, **kwargs): 347 def __call__(self, path, *args, **kwargs):
348 return self._orig(self._filter(path), *args, **kwargs) 348 return self._orig(self._filter(path), *args, **kwargs)
349
350 def join(self, path):
351 if path:
352 return self._orig.join(self._filter(path))
353 else:
354 return self._orig.join(path)
349 355
350 filteropener = filtervfs 356 filteropener = filtervfs
351 357
352 def canonpath(root, cwd, myname, auditor=None): 358 def canonpath(root, cwd, myname, auditor=None):
353 '''return the canonical path of myname, given cwd and root''' 359 '''return the canonical path of myname, given cwd and root'''