Patchwork D10417: clone: use `get_clone_path_usage`

login
register
mail settings
Submitter phabricator
Date April 14, 2021, 11:39 p.m.
Message ID <differential-rev-PHID-DREV-4uwfvh23vljedqg55i3j-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48731/
State Superseded
Headers show

Comments

phabricator - April 14, 2021, 11:39 p.m.
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

Patch

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)