Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
17156:7034365089bf | 17157:87e8440964a0 |
---|---|
194 '''Open files relative to a base directory | 194 '''Open files relative to a base directory |
195 | 195 |
196 This class is used to hide the details of COW semantics and | 196 This class is used to hide the details of COW semantics and |
197 remote file access from higher level code. | 197 remote file access from higher level code. |
198 ''' | 198 ''' |
199 def __init__(self, base, audit=True): | 199 def __init__(self, base, audit=True, expand=False): |
200 if expand: | |
201 base = os.path.realpath(util.expandpath(base)) | |
200 self.base = base | 202 self.base = base |
201 self._audit = audit | 203 self._audit = audit |
202 if audit: | 204 if audit: |
203 self.auditor = pathauditor(base) | 205 self.auditor = pathauditor(base) |
204 else: | 206 else: |