Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 49742:30eb36d93072
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).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 02 Dec 2022 16:36:43 +0100 |
parents | 3681a47611b8 |
children | afb27fc92717 |
comparison
equal
deleted
inserted
replaced
49741:2aaa5d1e57e9 | 49742:30eb36d93072 |
---|---|
978 _readsharedsourceconfig(lui, path) | 978 _readsharedsourceconfig(lui, path) |
979 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) | 979 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) |
980 lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) | 980 lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) |
981 | 981 |
982 if rpath: | 982 if rpath: |
983 path = urlutil.get_clone_path(lui, rpath)[0] | 983 path_obj = urlutil.get_clone_path_obj(lui, rpath) |
984 path = path_obj.rawloc | |
984 lui = ui.copy() | 985 lui = ui.copy() |
985 if rcutil.use_repo_hgrc(): | 986 if rcutil.use_repo_hgrc(): |
986 _readsharedsourceconfig(lui, path) | 987 _readsharedsourceconfig(lui, path) |
987 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) | 988 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) |
988 lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) | 989 lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) |