Patchwork D9359: dispatch: pass root path in ui.readconfig() as root of main repo

login
register
mail settings
Submitter phabricator
Date Nov. 21, 2020, 1:08 p.m.
Message ID <differential-rev-PHID-DREV-p45o5zsv35zmcsszb5kh-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47637/
State Superseded
Headers show

Comments

phabricator - Nov. 21, 2020, 1:08 p.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Since we are reading main (shared-source) repository config options, we
  should pass root as that repository root only.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dispatch.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -927,7 +927,8 @@ 
                 return
             hgvfs = vfs.vfs(os.path.join(path, b".hg"))
             sharedvfs = localrepo._getsharedvfs(hgvfs, requirements)
-            ui.readconfig(sharedvfs.join(b"hgrc"), path)
+            root = sharedvfs.base
+            ui.readconfig(sharedvfs.join(b"hgrc"), root)
     except IOError:
         pass