comparison mercurial/localrepo.py @ 18945:e75b72fffdfe

vfs: split "expand" into "realpath"/"expandpath" to apply each separately Before this patch, vfs constructor applies both "util.expandpath()" and "os.path.realpath()" on "base" path, if "expand" is True. This patch splits it into "realpath" and "expandpath", to apply each functions separately: this splitting can allow to use vfs also where one of each is not needed.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Mon, 15 Apr 2013 01:22:15 +0900
parents 0377352eb7d3
children 3d4f41eaae67
comparison
equal deleted inserted replaced
18944:a9c443b3b240 18945:e75b72fffdfe
151 151
152 def _baserequirements(self, create): 152 def _baserequirements(self, create):
153 return self.requirements[:] 153 return self.requirements[:]
154 154
155 def __init__(self, baseui, path=None, create=False): 155 def __init__(self, baseui, path=None, create=False):
156 self.wvfs = scmutil.vfs(path, expand=True) 156 self.wvfs = scmutil.vfs(path, expandpath=True, realpath=True)
157 self.wopener = self.wvfs 157 self.wopener = self.wvfs
158 self.root = self.wvfs.base 158 self.root = self.wvfs.base
159 self.path = self.wvfs.join(".hg") 159 self.path = self.wvfs.join(".hg")
160 self.origroot = path 160 self.origroot = path
161 self.auditor = scmutil.pathauditor(self.root, self._checknested) 161 self.auditor = scmutil.pathauditor(self.root, self._checknested)