Mercurial > hg
changeset 46957:e7d082e4ace6
dispatch: use the new API to resolve --repository
An even weirder feature of Mercurial is the ability to use `[paths]` alias as
value of `--repository`. The weird feature now use the new APIs.
Differential Revision: https://phab.mercurial-scm.org/D10424
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Apr 2021 20:57:34 +0200 |
parents | c5c2936f6fb2 |
children | 5a6a1cd21f09 |
files | mercurial/dispatch.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dispatch.py Wed Apr 14 20:21:11 2021 +0200 +++ b/mercurial/dispatch.py Wed Apr 14 20:57:34 2021 +0200 @@ -50,6 +50,7 @@ from .utils import ( procutil, stringutil, + urlutil, ) @@ -990,7 +991,7 @@ lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) if rpath: - path = lui.expandpath(rpath) + path = urlutil.get_clone_path(lui, rpath)[0] lui = ui.copy() if rcutil.use_repo_hgrc(): _readsharedsourceconfig(lui, path)