Patchwork D8794: subrepoutil: use relative path for looking up config `%include`s

login
register
mail settings
Submitter phabricator
Date July 22, 2020, 5:40 p.m.
Message ID <differential-rev-PHID-DREV-lu4uifz7axlzmo2ybqxc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46838/
State Superseded
Headers show

Comments

phabricator - July 22, 2020, 5:40 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8794

AFFECTED FILES
  mercurial/subrepoutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/subrepoutil.py b/mercurial/subrepoutil.py
--- a/mercurial/subrepoutil.py
+++ b/mercurial/subrepoutil.py
@@ -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()