##// END OF EJS Templates
errors: use InputError for some errors on `hg clone`...
Martin von Zweigbergk -
r46451:d6861895 default
parent child Browse files
Show More
@@ -683,14 +683,14 b' def clone('
683 source = util.urllocalpath(source)
683 source = util.urllocalpath(source)
684
684
685 if not dest:
685 if not dest:
686 raise error.Abort(_(b"empty destination path is not valid"))
686 raise error.InputError(_(b"empty destination path is not valid"))
687
687
688 destvfs = vfsmod.vfs(dest, expandpath=True)
688 destvfs = vfsmod.vfs(dest, expandpath=True)
689 if destvfs.lexists():
689 if destvfs.lexists():
690 if not destvfs.isdir():
690 if not destvfs.isdir():
691 raise error.Abort(_(b"destination '%s' already exists") % dest)
691 raise error.InputError(_(b"destination '%s' already exists") % dest)
692 elif destvfs.listdir():
692 elif destvfs.listdir():
693 raise error.Abort(_(b"destination '%s' is not empty") % dest)
693 raise error.InputError(_(b"destination '%s' is not empty") % dest)
694
694
695 createopts = {}
695 createopts = {}
696 narrow = False
696 narrow = False
@@ -601,7 +601,7 b' recurse infinitely (issue2528)'
601
601
602 $ hg clone full.hg ''
602 $ hg clone full.hg ''
603 abort: empty destination path is not valid
603 abort: empty destination path is not valid
604 [255]
604 [10]
605
605
606 test for https://bz.mercurial-scm.org/216
606 test for https://bz.mercurial-scm.org/216
607
607
@@ -73,7 +73,7 b" Invalid dest '' must abort:"
73
73
74 $ hg clone . ''
74 $ hg clone . ''
75 abort: empty destination path is not valid
75 abort: empty destination path is not valid
76 [255]
76 [10]
77
77
78 No update, with debug option:
78 No update, with debug option:
79
79
@@ -189,7 +189,7 b" Invalid dest '' with --pull must abort ("
189
189
190 $ hg clone --pull a ''
190 $ hg clone --pull a ''
191 abort: empty destination path is not valid
191 abort: empty destination path is not valid
192 [255]
192 [10]
193
193
194 Clone to '.':
194 Clone to '.':
195
195
@@ -676,7 +676,7 b' Default destination, same directory'
676 $ hg clone q
676 $ hg clone q
677 destination directory: q
677 destination directory: q
678 abort: destination 'q' is not empty
678 abort: destination 'q' is not empty
679 [255]
679 [10]
680
680
681 destination directory not empty
681 destination directory not empty
682
682
@@ -684,7 +684,7 b' destination directory not empty'
684 $ echo stuff > a/a
684 $ echo stuff > a/a
685 $ hg clone q a
685 $ hg clone q a
686 abort: destination 'a' is not empty
686 abort: destination 'a' is not empty
687 [255]
687 [10]
688
688
689
689
690 #if unix-permissions no-root
690 #if unix-permissions no-root
@@ -217,6 +217,6 b' no default destination if url has no pat'
217
217
218 $ hg clone http://localhost:$HGPORT/
218 $ hg clone http://localhost:$HGPORT/
219 abort: empty destination path is not valid
219 abort: empty destination path is not valid
220 [255]
220 [10]
221
221
222 $ cat error.log
222 $ cat error.log
@@ -367,7 +367,7 b' Test (non-)escaping of remote paths with'
367 $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
367 $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
368 destination directory: a repo
368 destination directory: a repo
369 abort: destination 'a repo' is not empty
369 abort: destination 'a repo' is not empty
370 [255]
370 [10]
371
371
372 Test hg-ssh using a helper script that will restore PYTHONPATH (which might
372 Test hg-ssh using a helper script that will restore PYTHONPATH (which might
373 have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right
373 have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right
@@ -387,7 +387,7 b' Test (non-)escaping of remote paths with'
387 $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
387 $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
388 destination directory: a repo
388 destination directory: a repo
389 abort: destination 'a repo' is not empty
389 abort: destination 'a repo' is not empty
390 [255]
390 [10]
391
391
392 Make sure hg is really paranoid in serve --stdio mode. It used to be
392 Make sure hg is really paranoid in serve --stdio mode. It used to be
393 possible to get a debugger REPL by specifying a repo named --debugger.
393 possible to get a debugger REPL by specifying a repo named --debugger.
General Comments 0
You need to be logged in to leave comments. Login now