[PATCH 2 of 5] localrepo: use "vfs" constructor instead of "opener" one

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sat Aug 11 07:14:44 CDT 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1344687075 -32400
# Node ID 592ebd0c4ad94c3d20c5e7e4a030b84cb854bb45
# Parent  dea54508bb39698cfd74b1281b0d12af09aff139
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.

diff -r dea54508bb39 -r 592ebd0c4ad9 mercurial/localrepo.py
--- a/mercurial/localrepo.py	Sat Aug 11 21:11:14 2012 +0900
+++ b/mercurial/localrepo.py	Sat Aug 11 21:11:15 2012 +0900
@@ -117,14 +117,14 @@
         return self.requirements[:]
 
     def __init__(self, baseui, path=None, create=False):
-        self.wopener = scmutil.opener(path, expand=True)
-        self.wvfs = self.wopener
+        self.wvfs = scmutil.vfs(path, expand=True)
+        self.wopener = self.wvfs
         self.root = self.wvfs.base
         self.path = self.wvfs.join(".hg")
         self.origroot = path
         self.auditor = scmutil.pathauditor(self.root, self._checknested)
-        self.opener = scmutil.opener(self.path)
-        self.vfs = self.opener
+        self.vfs = scmutil.vfs(self.path)
+        self.opener = self.vfs
         self.baseui = baseui
         self.ui = baseui.copy()
         # A list of callback to shape the phase if no data were found.


More information about the Mercurial-devel mailing list