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
--- a/mercurial/config.py Wed Jul 22 10:25:28 2020 -0700
+++ b/mercurial/config.py Wed Jul 22 10:32:28 2020 -0700
@@ -213,7 +213,10 @@
% (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(