##// END OF EJS Templates
encoding: pull fallbackencoding out of localrepo into early parsing
Matt Mackall -
r4619:5fd7cc89 default
parent child Browse files
Show More
@@ -261,20 +261,24 def dispatch(ui, args):
261 261 if cwd:
262 262 os.chdir(cwd)
263 263
264 extensions.loadall(ui)
265
266 264 # read the local repository .hgrc into a local ui object
267 265 # this will trigger its extensions to load
268 266 path = earlygetopt(["-R", "--repository", "--repo"], args)
269 267 if not path:
270 268 path = findrepo() or ""
269 lui = ui
271 270 if path:
272 271 try:
273 272 lui = commands.ui.ui(parentui=ui)
274 273 lui.readconfig(os.path.join(path, ".hg", "hgrc"))
274 except IOError:
275 pass
276
275 277 extensions.loadall(lui)
276 except IOError:
277 extensions.loadall(ui)
278 # check for fallback encoding
279 fallback = lui.config('ui', 'fallbackencoding')
280 if fallback:
281 util._fallbackencoding = fallback
278 282
279 283 cmd, func, args, options, cmdoptions = parse(ui, args)
280 284
@@ -80,10 +80,6 class localrepository(repo.repository):
80 80 except IOError:
81 81 pass
82 82
83 fallback = self.ui.config('ui', 'fallbackencoding')
84 if fallback:
85 util._fallbackencoding = fallback
86
87 83 self.tagscache = None
88 84 self.branchcache = None
89 85 self.nodetagscache = None
@@ -1,5 +1,5
1 1 uisetup called
2 ui.parentui is None
2 ui.parentui isnot None
3 3 reposetup called for a
4 4 ui == repo.ui
5 5 Foo
@@ -15,7 +15,7 ui.parentui is None
15 15 Bar
16 16 % module/__init__.py-style
17 17 uisetup called
18 ui.parentui is None
18 ui.parentui isnot None
19 19 reposetup called for a
20 20 ui == repo.ui
21 21 Foo
General Comments 0
You need to be logged in to leave comments. Login now