diff mercurial/scmutil.py @ 17157:87e8440964a0

localrepo: use path expansion API via vfs As a part of migration to vfs, this patch moves path expansion API invocations in the constructor of "localrepository" to the constructor of "opener", because the root path to the repository is very important to handle paths using non-ASCII characters correctly. This patch also rearrange initialization order of "wvfs" field, because it is required to initialize "self.root".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 06 Jul 2012 18:45:27 +0900
parents 5a9acb0b2086
children be016e96117a
line wrap: on
line diff
--- a/mercurial/scmutil.py	Fri Jul 06 18:45:26 2012 +0900
+++ b/mercurial/scmutil.py	Fri Jul 06 18:45:27 2012 +0900
@@ -196,7 +196,9 @@
     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):
+    def __init__(self, base, audit=True, expand=False):
+        if expand:
+            base = os.path.realpath(util.expandpath(base))
         self.base = base
         self._audit = audit
         if audit: