comparison mercurial/scmutil.py @ 17681:a41fd730f230

scmutil: backout 83785bb56062 (issue3643)
author Matt Mackall <mpm@selenic.com>
date Sat, 29 Sep 2012 11:57:16 -0500
parents 8575f4a2126e
children ab23768746fd
comparison
equal deleted inserted replaced
17680:16ec37411db5 17681:a41fd730f230
227 ''' 227 '''
228 def __init__(self, base, audit=True, expand=False): 228 def __init__(self, base, audit=True, expand=False):
229 if expand: 229 if expand:
230 base = os.path.realpath(util.expandpath(base)) 230 base = os.path.realpath(util.expandpath(base))
231 self.base = base 231 self.base = base
232 self.basesep = self.base + os.sep
233 self._setmustaudit(audit) 232 self._setmustaudit(audit)
234 self.createmode = None 233 self.createmode = None
235 self._trustnlink = None 234 self._trustnlink = None
236 235
237 def _getmustaudit(self): 236 def _getmustaudit(self):
330 def audit(self, path): 329 def audit(self, path):
331 self.auditor(path) 330 self.auditor(path)
332 331
333 def join(self, path): 332 def join(self, path):
334 if path: 333 if path:
335 return path.startswith('/') and path or (self.basesep + path) 334 return os.path.join(self.base, path)
336 return self.base 335 else:
336 return self.base
337 337
338 opener = vfs 338 opener = vfs
339 339
340 class filtervfs(abstractvfs): 340 class filtervfs(abstractvfs):
341 '''Wrapper vfs for filtering filenames with a function.''' 341 '''Wrapper vfs for filtering filenames with a function.'''