Mercurial > hg-stable
changeset 8797:9ed150d2fbd5
repo: set up ui and extensions earlier
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 13 Jun 2009 14:44:59 -0500 |
parents | 2bcef677a6c3 |
children | 92fc57c9f9d1 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Jun 10 19:11:49 2009 -0400 +++ b/mercurial/localrepo.py Sat Jun 13 14:44:59 2009 -0500 @@ -28,6 +28,14 @@ self.origroot = path self.opener = util.opener(self.path) self.wopener = util.opener(self.root) + self.baseui = baseui + self.ui = baseui.copy() + + try: + self.ui.readconfig(self.join("hgrc"), self.root) + extensions.loadall(self.ui) + except IOError: + pass if not os.path.isdir(self.path): if create: @@ -35,10 +43,10 @@ os.mkdir(path) os.mkdir(self.path) requirements = ["revlogv1"] - if baseui.configbool('format', 'usestore', True): + if self.ui.configbool('format', 'usestore', True): os.mkdir(os.path.join(self.path, "store")) requirements.append("store") - if baseui.configbool('format', 'usefncache', True): + if self.ui.configbool('format', 'usefncache', True): requirements.append("fncache") # create an invalid changelog self.opener("00changelog.i", "a").write( @@ -70,14 +78,6 @@ self.sjoin = self.store.join self.opener.createmode = self.store.createmode - self.baseui = baseui - self.ui = baseui.copy() - try: - self.ui.readconfig(self.join("hgrc"), self.root) - extensions.loadall(self.ui) - except IOError: - pass - self.tagscache = None self._tagstypecache = None self.branchcache = None