# HG changeset patch # User Pierre-Yves David # Date 1618426654 -7200 # Node ID e7d082e4ace6740024c0d81cc078f25ab63575ea # Parent c5c2936f6fb265b9bcc2740a98b1fede1b963d87 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 diff -r c5c2936f6fb2 -r e7d082e4ace6 mercurial/dispatch.py --- 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)