# HG changeset patch # User Martin von Zweigbergk # Date 2020-07-22 17:32:28 # Node ID 83ca8d6f3206e1ed39de05433d3abb290dd7b3d9 # Parent 0323972f78f376dc6f674206add4251e9386a35d config: re-calculate absolute %include path in `include` callback This removes the last user of the `abs` argument for the `include` callback. The next patch will remove the argument. Differential Revision: https://phab.mercurial-scm.org/D8795 diff --git a/mercurial/config.py b/mercurial/config.py --- a/mercurial/config.py +++ b/mercurial/config.py @@ -213,7 +213,10 @@ class config(object): % (fp, fp.mode,) ) + dir = os.path.dirname(path) + def include(rel, abs, remap, sections): + abs = os.path.normpath(os.path.join(dir, rel)) self.read(abs, remap=remap, sections=sections) self.parse(