D10419: share: use `get_clone_path`
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Wed Apr 14 23:40:26 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
Since `hg share` is mostly like clone, do the same changes there.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10419
AFFECTED FILES
mercurial/hg.py
CHANGE DETAILS
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -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:
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list