Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 12637:42ca7aef28d3
dispatch: properly handle relative path aliases used with -R (issue2376)
This ensures the repo config is read relative to the repo root during
dispatch.
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Mon, 04 Oct 2010 15:07:12 -0500 |
parents | c24215aa7e69 |
children | d10369fefd01 |
comparison
equal
deleted
inserted
replaced
12636:c24215aa7e69 | 12637:42ca7aef28d3 |
---|---|
418 path = cmdutil.findrepo(wd) or "" | 418 path = cmdutil.findrepo(wd) or "" |
419 if not path: | 419 if not path: |
420 lui = ui | 420 lui = ui |
421 else: | 421 else: |
422 lui = ui.copy() | 422 lui = ui.copy() |
423 lui.readconfig(os.path.join(path, ".hg", "hgrc")) | 423 lui.readconfig(os.path.join(path, ".hg", "hgrc"), path) |
424 | 424 |
425 if rpath: | 425 if rpath: |
426 path = lui.expandpath(rpath[-1]) | 426 path = lui.expandpath(rpath[-1]) |
427 lui = ui.copy() | 427 lui = ui.copy() |
428 lui.readconfig(os.path.join(path, ".hg", "hgrc")) | 428 lui.readconfig(os.path.join(path, ".hg", "hgrc"), path) |
429 | 429 |
430 return path, lui | 430 return path, lui |
431 | 431 |
432 def _checkshellalias(ui, args): | 432 def _checkshellalias(ui, args): |
433 cwd = os.getcwd() | 433 cwd = os.getcwd() |