Mercurial > hg
diff mercurial/hgweb/hgwebdir_mod.py @ 44245:bf23d6ee7ec7 stable
config: also respect HGRCSKIPREPO in hgwebdir_mod
Differential Revision: https://phab.mercurial-scm.org/D8074
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 04 Feb 2020 12:07:42 +0100 |
parents | 71582c5ad00f |
children | 91aa9bba3dc9 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py Mon Feb 03 20:41:11 2020 +0100 +++ b/mercurial/hgweb/hgwebdir_mod.py Tue Feb 04 12:07:42 2020 +0100 @@ -35,6 +35,7 @@ pathutil, profiling, pycompat, + rcutil, registrar, scmutil, templater, @@ -192,11 +193,12 @@ continue u = ui.copy() - try: - u.readconfig(os.path.join(path, b'.hg', b'hgrc')) - except Exception as e: - u.warn(_(b'error reading %s/.hg/hgrc: %s\n') % (path, e)) - continue + if rcutil.use_repo_hgrc(): + try: + u.readconfig(os.path.join(path, b'.hg', b'hgrc')) + except Exception as e: + u.warn(_(b'error reading %s/.hg/hgrc: %s\n') % (path, e)) + continue def get(section, name, default=uimod._unset): return u.config(section, name, default, untrusted=True)