Show More
@@ -262,10 +262,8 b' def dispatch(ui, args):' | |||||
262 | os.chdir(cwd) |
|
262 | os.chdir(cwd) | |
263 |
|
263 | |||
264 | # read the local repository .hgrc into a local ui object |
|
264 | # read the local repository .hgrc into a local ui object | |
265 | # this will trigger its extensions to load |
|
265 | path = findrepo() or "" | |
266 | path = earlygetopt(["-R", "--repository", "--repo"], args) |
|
|||
267 | if not path: |
|
266 | if not path: | |
268 | path = findrepo() or "" |
|
|||
269 | lui = ui |
|
267 | lui = ui | |
270 | if path: |
|
268 | if path: | |
271 | try: |
|
269 | try: | |
@@ -274,6 +272,13 b' def dispatch(ui, args):' | |||||
274 | except IOError: |
|
272 | except IOError: | |
275 | pass |
|
273 | pass | |
276 |
|
274 | |||
|
275 | # now we can expand paths, even ones in .hg/hgrc | |||
|
276 | rpath = earlygetopt(["-R", "--repository", "--repo"], args) | |||
|
277 | if rpath: | |||
|
278 | path = lui.expandpath(rpath) | |||
|
279 | lui = commands.ui.ui(parentui=ui) | |||
|
280 | lui.readconfig(os.path.join(path, ".hg", "hgrc")) | |||
|
281 | ||||
277 | extensions.loadall(lui) |
|
282 | extensions.loadall(lui) | |
278 | # check for fallback encoding |
|
283 | # check for fallback encoding | |
279 | fallback = lui.config('ui', 'fallbackencoding') |
|
284 | fallback = lui.config('ui', 'fallbackencoding') |
General Comments 0
You need to be logged in to leave comments.
Login now