diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -153,7 +153,7 @@ class localrepository(object): return self.requirements[:] def __init__(self, baseui, path=None, create=False): - self.wvfs = scmutil.vfs(path, expand=True) + self.wvfs = scmutil.vfs(path, expandpath=True, realpath=True) self.wopener = self.wvfs self.root = self.wvfs.base self.path = self.wvfs.join(".hg") diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -263,9 +263,11 @@ class vfs(abstractvfs): This class is used to hide the details of COW semantics and remote file access from higher level code. ''' - def __init__(self, base, audit=True, expand=False): - if expand: - base = os.path.realpath(util.expandpath(base)) + def __init__(self, base, audit=True, expandpath=False, realpath=False): + if expandpath: + base = util.expandpath(base) + if realpath: + base = os.path.realpath(base) self.base = base self._setmustaudit(audit) self.createmode = None