hgext3rd/__init__.py
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 05 Nov 2018 14:14:32 -0800
changeset 40535 473510bf0575
parent 28541 4b81487a01d4
child 43076 2372284d9457
permissions -rw-r--r--
localrepo: extract loading of hgrc files to standalone function Various 3rd party extensions supplement where per-repo config data lives. Looking at their sources, they resort to unorthodox means to inject the config data. And the way they do it is susceptible to corner cases. e.g. not processing automatic extension loads, not reacting to new or disabled extensions in configs, etc. This commit extracts the core logic of loading hgrc files into a standalone function so there is a clear function that can be monkeypatched to inject per-repo config data at repository open time. Differential Revision: https://phab.mercurial-scm.org/D5221
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28541
4b81487a01d4 extensions: also search for extension in the 'hgext3rd' package
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28450
diff changeset
     1
# name space package to host third party extensions
28450
155e3308289c hgext: officially turn 'hgext' into a namespace package
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1360
diff changeset
     2
from __future__ import absolute_import
155e3308289c hgext: officially turn 'hgext' into a namespace package
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1360
diff changeset
     3
import pkgutil
155e3308289c hgext: officially turn 'hgext' into a namespace package
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1360
diff changeset
     4
__path__ = pkgutil.extend_path(__path__, __name__)