From patchwork Wed Apr 14 23:39:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10417: clone: use `get_clone_path_usage` From: phabricator X-Patchwork-Id: 48731 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Wed, 14 Apr 2021 23:39:41 +0000 marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY "Surprisingly", the new API is well suited for `hg clone` too. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10417 AFFECTED FILES mercurial/hg.py CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -689,7 +689,7 @@ if dest: ui.status(_(b"destination directory: %s\n") % dest) else: - dest = ui.expandpath(dest) + dest = urlutil.get_clone_path(ui, dest)[0] dest = urlutil.urllocalpath(dest) source = urlutil.urllocalpath(source)