comparison mercurial/localrepo.py @ 17650:bf2eb3a126d2

localrepo: use "vfs" constructor instead of "opener" one This patch also changes initialization order of "*opener" and "*vfs" fields: first, "*vfs" fields are initialized , and then, "*opener" ones are initialized.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 31 Aug 2012 02:06:29 +0900
parents fc530080013b
children 1dc37491e9fb
comparison
equal deleted inserted replaced
17649:f65c6a5f256c 17650:bf2eb3a126d2
115 115
116 def _baserequirements(self, create): 116 def _baserequirements(self, create):
117 return self.requirements[:] 117 return self.requirements[:]
118 118
119 def __init__(self, baseui, path=None, create=False): 119 def __init__(self, baseui, path=None, create=False):
120 self.wopener = scmutil.opener(path, expand=True) 120 self.wvfs = scmutil.vfs(path, expand=True)
121 self.wvfs = self.wopener 121 self.wopener = self.wvfs
122 self.root = self.wvfs.base 122 self.root = self.wvfs.base
123 self.path = self.wvfs.join(".hg") 123 self.path = self.wvfs.join(".hg")
124 self.origroot = path 124 self.origroot = path
125 self.auditor = scmutil.pathauditor(self.root, self._checknested) 125 self.auditor = scmutil.pathauditor(self.root, self._checknested)
126 self.opener = scmutil.opener(self.path) 126 self.vfs = scmutil.vfs(self.path)
127 self.vfs = self.opener 127 self.opener = self.vfs
128 self.baseui = baseui 128 self.baseui = baseui
129 self.ui = baseui.copy() 129 self.ui = baseui.copy()
130 # A list of callback to shape the phase if no data were found. 130 # A list of callback to shape the phase if no data were found.
131 # Callback are in the form: func(repo, roots) --> processed root. 131 # Callback are in the form: func(repo, roots) --> processed root.
132 # This list it to be filled by extension during repo setup 132 # This list it to be filled by extension during repo setup