Mercurial > hg
changeset 46952:82366464190a
init: use `get_clone_path` when suitable
`hg init` has this weird feature were you can refer to `[paths]` entry select the path to initialize. We move that code to the new APIs.
Differential Revision: https://phab.mercurial-scm.org/D10418
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Apr 2021 18:02:25 +0200 |
parents | 338ab1d89ddb |
children | 394cfc42c05c |
files | mercurial/commands.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Apr 14 18:34:42 2021 +0200 +++ b/mercurial/commands.py Wed Apr 14 18:02:25 2021 +0200 @@ -4376,7 +4376,8 @@ Returns 0 on success. """ opts = pycompat.byteskwargs(opts) - peer = hg.peer(ui, opts, ui.expandpath(dest), create=True) + path = urlutil.get_clone_path(ui, dest)[1] + peer = hg.peer(ui, opts, path, create=True) peer.close()