Mercurial > hg
comparison mercurial/dispatch.py @ 44244:ef11dfc56674 stable
config: also respect HGRCSKIPREPO in `dispatch._getlocal`
For some reason, we are also reading the local config in that function.
Differential Revision: https://phab.mercurial-scm.org/D8073
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 Feb 2020 20:41:11 +0100 |
parents | 6b90f5c89cb4 |
children | a0ec05d93c8e |
comparison
equal
deleted
inserted
replaced
44243:238790674d69 | 44244:ef11dfc56674 |
---|---|
35 help, | 35 help, |
36 hg, | 36 hg, |
37 hook, | 37 hook, |
38 profiling, | 38 profiling, |
39 pycompat, | 39 pycompat, |
40 rcutil, | |
40 registrar, | 41 registrar, |
41 scmutil, | 42 scmutil, |
42 ui as uimod, | 43 ui as uimod, |
43 util, | 44 util, |
44 ) | 45 ) |
900 except OSError as e: | 901 except OSError as e: |
901 raise error.Abort( | 902 raise error.Abort( |
902 _(b"error getting current working directory: %s") | 903 _(b"error getting current working directory: %s") |
903 % encoding.strtolocal(e.strerror) | 904 % encoding.strtolocal(e.strerror) |
904 ) | 905 ) |
906 | |
905 path = cmdutil.findrepo(wd) or b"" | 907 path = cmdutil.findrepo(wd) or b"" |
906 if not path: | 908 if not path: |
907 lui = ui | 909 lui = ui |
908 else: | 910 else: |
909 lui = ui.copy() | 911 lui = ui.copy() |
910 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) | 912 if rcutil.use_repo_hgrc(): |
913 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) | |
911 | 914 |
912 if rpath: | 915 if rpath: |
913 path = lui.expandpath(rpath) | 916 path = lui.expandpath(rpath) |
914 lui = ui.copy() | 917 lui = ui.copy() |
915 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) | 918 if rcutil.use_repo_hgrc(): |
919 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) | |
916 | 920 |
917 return path, lui | 921 return path, lui |
918 | 922 |
919 | 923 |
920 def _checkshellalias(lui, ui, args): | 924 def _checkshellalias(lui, ui, args): |