# HG changeset patch # User Pierre-Yves David # Date 1618418249 -7200 # Node ID 394cfc42c05c728be1fcef6dff2be51083f0889b # Parent 82366464190abbca9c06cb06ddc7ee4fb6b28fc9 share: use `get_clone_path` Since `hg share` is mostly like clone, do the same changes there. Differential Revision: https://phab.mercurial-scm.org/D10419 diff -r 82366464190a -r 394cfc42c05c mercurial/hg.py --- a/mercurial/hg.py Wed Apr 14 18:02:25 2021 +0200 +++ b/mercurial/hg.py Wed Apr 14 18:37:29 2021 +0200 @@ -305,11 +305,10 @@ if not dest: dest = defaultdest(source) else: - dest = ui.expandpath(dest) + dest = urlutil.get_clone_path(ui, dest)[1] if isinstance(source, bytes): - origsource = ui.expandpath(source) - source, branches = urlutil.parseurl(origsource) + origsource, source, branches = urlutil.get_clone_path(ui, source) srcrepo = repository(ui, source) rev, checkout = addbranchrevs(srcrepo, srcrepo, branches, None) else: