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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sat Nov 21 13:08:02 UTC 2020


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

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
 



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


More information about the Mercurial-devel mailing list