[Updated] D8793: config: remove now-unused support for "includepaths"
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sun Aug 2 16:07:21 UTC 2020
Closed by commit rHG3f54242781e9: config: remove now-unused support for "includepaths" (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8793?vs=22056&id=22176
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8793/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8793
AFFECTED FILES
mercurial/config.py
CHANGE DETAILS
diff --git a/mercurial/config.py b/mercurial/config.py
--- a/mercurial/config.py
+++ b/mercurial/config.py
@@ -21,10 +21,9 @@
class config(object):
- def __init__(self, data=None, includepaths=None):
+ def __init__(self, data=None):
self._data = {}
self._unset = []
- self._includepaths = includepaths or []
if data:
for k in data._data:
self._data[k] = data[k].copy()
@@ -162,21 +161,18 @@
if m and include:
expanded = util.expandpath(m.group(1))
- includepaths = [os.path.dirname(src)] + self._includepaths
-
- for base in includepaths:
- inc = os.path.normpath(os.path.join(base, expanded))
-
- try:
- include(expanded, inc, remap=remap, sections=sections)
- break
- except IOError as inst:
- if inst.errno != errno.ENOENT:
- raise error.ParseError(
- _(b"cannot include %s (%s)")
- % (inc, encoding.strtolocal(inst.strerror)),
- b"%s:%d" % (src, line),
- )
+ inc = os.path.normpath(
+ os.path.join(os.path.dirname(src), expanded)
+ )
+ try:
+ include(expanded, inc, remap=remap, sections=sections)
+ except IOError as inst:
+ if inst.errno != errno.ENOENT:
+ raise error.ParseError(
+ _(b"cannot include %s (%s)")
+ % (inc, encoding.strtolocal(inst.strerror)),
+ b"%s:%d" % (src, line),
+ )
continue
if emptyre.match(l):
continue
To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200802/2517f586/attachment.html>
More information about the Mercurial-patches
mailing list