Show More
@@ -37,6 +37,7 b' from . import (' | |||
|
37 | 37 | hook, |
|
38 | 38 | profiling, |
|
39 | 39 | pycompat, |
|
40 | rcutil, | |
|
40 | 41 | registrar, |
|
41 | 42 | scmutil, |
|
42 | 43 | ui as uimod, |
@@ -902,16 +903,19 b' def _getlocal(ui, rpath, wd=None):' | |||
|
902 | 903 | _(b"error getting current working directory: %s") |
|
903 | 904 | % encoding.strtolocal(e.strerror) |
|
904 | 905 | ) |
|
906 | ||
|
905 | 907 | path = cmdutil.findrepo(wd) or b"" |
|
906 | 908 | if not path: |
|
907 | 909 | lui = ui |
|
908 | 910 | else: |
|
909 | 911 | lui = ui.copy() |
|
912 | if rcutil.use_repo_hgrc(): | |
|
910 | 913 | lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) |
|
911 | 914 | |
|
912 | 915 | if rpath: |
|
913 | 916 | path = lui.expandpath(rpath) |
|
914 | 917 | lui = ui.copy() |
|
918 | if rcutil.use_repo_hgrc(): | |
|
915 | 919 | lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) |
|
916 | 920 | |
|
917 | 921 | return path, lui |
@@ -271,3 +271,13 b' Test we can skip the user configuration' | |||
|
271 | 271 | $ HGRCSKIPREPO=1 hg path |
|
272 | 272 | foo = $TESTTMP/bar |
|
273 | 273 | |
|
274 | $ cat >> .hg/hgrc <<EOF | |
|
275 | > [broken | |
|
276 | > EOF | |
|
277 | ||
|
278 | $ hg path | |
|
279 | hg: parse error at $TESTTMP/.hg/hgrc:3: [broken | |
|
280 | [255] | |
|
281 | $ HGRCSKIPREPO=1 hg path | |
|
282 | foo = $TESTTMP/bar | |
|
283 |
General Comments 0
You need to be logged in to leave comments.
Login now