Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 46951:338ab1d89ddb
clone: use `get_clone_path`
"Surprisingly", the new API is well suited for `hg clone` too.
Differential Revision: https://phab.mercurial-scm.org/D10417
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Apr 2021 18:34:42 +0200 |
parents | 279df499511e |
children | 394cfc42c05c |
comparison
equal
deleted
inserted
replaced
46950:279df499511e | 46951:338ab1d89ddb |
---|---|
687 if dest is None: | 687 if dest is None: |
688 dest = defaultdest(source) | 688 dest = defaultdest(source) |
689 if dest: | 689 if dest: |
690 ui.status(_(b"destination directory: %s\n") % dest) | 690 ui.status(_(b"destination directory: %s\n") % dest) |
691 else: | 691 else: |
692 dest = ui.expandpath(dest) | 692 dest = urlutil.get_clone_path(ui, dest)[0] |
693 | 693 |
694 dest = urlutil.urllocalpath(dest) | 694 dest = urlutil.urllocalpath(dest) |
695 source = urlutil.urllocalpath(source) | 695 source = urlutil.urllocalpath(source) |
696 | 696 |
697 if not dest: | 697 if not dest: |