subrepoutil: use relative path for looking up config `%include`s
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 22 Jul 2020 10:25:28 -0700
changeset 45255 0323972f78f3
parent 45254 3f54242781e9
child 45256 83ca8d6f3206
subrepoutil: use relative path for looking up config `%include`s The code was already working with relative paths in practice, since it passed in a (repo-)relative path into its local `read()` function. So all that this patch actually does is to switch to rename variables so we use the same path by a different name. This gets us closer to removing the "absolute" path from the `include` callback. Differential Revision: https://phab.mercurial-scm.org/D8794
mercurial/subrepoutil.py
--- a/mercurial/subrepoutil.py	Wed Jul 22 00:13:02 2020 -0700
+++ b/mercurial/subrepoutil.py	Wed Jul 22 10:25:28 2020 -0700
@@ -36,7 +36,7 @@
     p = config.config()
     repo = ctx.repo()
 
-    def read(rel, f, sections=None, remap=None):
+    def read(f, abs, sections=None, remap=None):
         if f in ctx:
             try:
                 data = ctx[f].data()