This instance will be upgraded to Heptapod 0.21.0rc3 on 2021-04-23 at 10:30 UTC+2 (a few minutes of down time)

Commit 77c2e3e8 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk

errors: use InputError for some errors on `hg clone`

Differential Revision: https://phab.mercurial-scm.org/D9329
parent 96ca817ec192
Pipeline #12953 failed with stage
in 27 minutes and 39 seconds
......@@ -683,14 +683,14 @@ def clone(
source = util.urllocalpath(source)
if not dest:
raise error.Abort(_(b"empty destination path is not valid"))
raise error.InputError(_(b"empty destination path is not valid"))
destvfs = vfsmod.vfs(dest, expandpath=True)
if destvfs.lexists():
if not destvfs.isdir():
raise error.Abort(_(b"destination '%s' already exists") % dest)
raise error.InputError(_(b"destination '%s' already exists") % dest)
elif destvfs.listdir():
raise error.Abort(_(b"destination '%s' is not empty") % dest)
raise error.InputError(_(b"destination '%s' is not empty") % dest)
createopts = {}
narrow = False
......
......@@ -601,7 +601,7 @@ recurse infinitely (issue2528)
$ hg clone full.hg ''
abort: empty destination path is not valid
[255]
[10]
test for https://bz.mercurial-scm.org/216
......
......@@ -73,7 +73,7 @@ Invalid dest '' must abort:
$ hg clone . ''
abort: empty destination path is not valid
[255]
[10]
No update, with debug option:
......@@ -189,7 +189,7 @@ Invalid dest '' with --pull must abort (issue2528):
$ hg clone --pull a ''
abort: empty destination path is not valid
[255]
[10]
Clone to '.':
......@@ -676,7 +676,7 @@ Default destination, same directory
$ hg clone q
destination directory: q
abort: destination 'q' is not empty
[255]
[10]
destination directory not empty
......@@ -684,7 +684,7 @@ destination directory not empty
$ echo stuff > a/a
$ hg clone q a
abort: destination 'a' is not empty
[255]
[10]
#if unix-permissions no-root
......
......@@ -217,6 +217,6 @@ no default destination if url has no path:
$ hg clone http://localhost:$HGPORT/
abort: empty destination path is not valid
[255]
[10]
$ cat error.log
......@@ -367,7 +367,7 @@ Test (non-)escaping of remote paths with spaces when cloning (issue3145):
$ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
destination directory: a repo
abort: destination 'a repo' is not empty
[255]
[10]
Test hg-ssh using a helper script that will restore PYTHONPATH (which might
have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right
......
......@@ -387,7 +387,7 @@ Test (non-)escaping of remote paths with spaces when cloning (issue3145):
$ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
destination directory: a repo
abort: destination 'a repo' is not empty
[255]
[10]
Make sure hg is really paranoid in serve --stdio mode. It used to be
possible to get a debugger REPL by specifying a repo named --debugger.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment