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).
--- 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)