"Surprisingly", the new API is well suited for hg clone too.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
pulkit |
hg-reviewers |
"Surprisingly", the new API is well suited for hg clone too.
No Linters Available |
No Unit Test Coverage |
In D10417#158549, @pulkit wrote:s/get_clone_path_usage/get_clone_path in commit message?
a yes. Thanks for spotting this.
Path | Packages | |||
---|---|---|---|---|
M | mercurial/hg.py (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
4c7236e90ca2 | 828b44d7d8c8 | Pierre-Yves David | Apr 14 2021, 12:34 PM |
try: | try: | ||||
revs, checkout = addbranchrevs(srcpeer, srcpeer, branches, revs) | revs, checkout = addbranchrevs(srcpeer, srcpeer, branches, revs) | ||||
if dest is None: | if dest is None: | ||||
dest = defaultdest(source) | dest = defaultdest(source) | ||||
if dest: | if dest: | ||||
ui.status(_(b"destination directory: %s\n") % dest) | ui.status(_(b"destination directory: %s\n") % dest) | ||||
else: | else: | ||||
dest = ui.expandpath(dest) | dest = urlutil.get_clone_path(ui, dest)[0] | ||||
dest = urlutil.urllocalpath(dest) | dest = urlutil.urllocalpath(dest) | ||||
source = urlutil.urllocalpath(source) | source = urlutil.urllocalpath(source) | ||||
if not dest: | if not dest: | ||||
raise error.InputError(_(b"empty destination path is not valid")) | raise error.InputError(_(b"empty destination path is not valid")) | ||||
destvfs = vfsmod.vfs(dest, expandpath=True) | destvfs = vfsmod.vfs(dest, expandpath=True) |