path: use `get_clone_path_obj` in _getlocal
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 02 Dec 2022 16:36:43 +0100
changeset 49742 30eb36d93072
parent 49741 2aaa5d1e57e9
child 49743 f22364e4eb13
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).
mercurial/dispatch.py
--- a/mercurial/dispatch.py	Fri Dec 02 16:34:00 2022 +0100
+++ b/mercurial/dispatch.py	Fri Dec 02 16:36:43 2022 +0100
@@ -980,7 +980,8 @@
             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)