# HG changeset patch # User Pierre-Yves David # Date 2024-10-22 21:50:11 # Node ID 8ac33b3f2552f157a2de0bd829b3d90be84df017 # Parent 91f22b89ea052ad5a76e3d6d4b810c19d3d3446c repo-config: clarify why we seems to parse the repository "twice" That is not the first time I am confused about this code, lets add a comment to save time in the future. diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -986,6 +986,9 @@ def _getlocal(ui, rpath, wd=None): lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) if rpath: + # the specified path, might be defined in the [paths] section of the + # local repository. So we had to read the local config first even if it + # get overriden here. path_obj = urlutil.get_clone_path_obj(lui, rpath) path = path_obj.rawloc lui = ui.copy()