# HG changeset patch # User Pierre-Yves David # Date 2022-12-02 15:36:43 # Node ID 30eb36d93072c72a4918bea60db9b5499bb4c4ba # Parent 2aaa5d1e57e9e103b3a5ec7febe7081c7490db00 path: use `get_clone_path_obj` in _getlocal We don't need to feed the `path` object to a `peer` object, but using an higher level function is simpler here (e.g. no subscript access, explicit attribute access). diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -980,7 +980,8 @@ def _getlocal(ui, rpath, wd=None): lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) if rpath: - path = urlutil.get_clone_path(lui, rpath)[0] + path_obj = urlutil.get_clone_path_obj(lui, rpath) + path = path_obj.rawloc lui = ui.copy() if rcutil.use_repo_hgrc(): _readsharedsourceconfig(lui, path)