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 0ef7d3f9 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk

errors: raise InputError when given non-existent paths etc

Differential Revision: https://phab.mercurial-scm.org/D9328
parent f96fa4de5055
......@@ -459,7 +459,7 @@ def dorecord(
)
def fail(f, msg):
raise error.Abort(b'%s: %s' % (f, msg))
raise error.InputError(b'%s: %s' % (f, msg))
force = opts.get(b'force')
if not force:
......
......@@ -2845,7 +2845,7 @@ class localrepository(object):
extra = {}
def fail(f, msg):
raise error.Abort(b'%s: %s' % (f, msg))
raise error.InputError(b'%s: %s' % (f, msg))
if not match:
match = matchmod.always()
......
......@@ -61,7 +61,7 @@ Abort for untracked
$ touch untracked
$ hg commit -i -m should-fail empty-rw untracked
abort: untracked: file not tracked!
[255]
[10]
$ rm untracked
Record empty file
......
......@@ -54,7 +54,7 @@ commit added file that has been deleted
[1]
$ hg commit -m commit-8-2 bar
abort: bar: file not found!
[255]
[10]
$ hg -q revert -a --no-backup
......@@ -74,7 +74,7 @@ commit added file that has been deleted
adding dir.file
$ hg commit -m commit-10 dir dir.file
abort: dir: no match under directory!
[255]
[10]
$ echo >> dir/file
$ mkdir bleh
......@@ -82,10 +82,10 @@ commit added file that has been deleted
$ cd bleh
$ hg commit -m commit-11 .
abort: bleh: no match under directory!
[255]
[10]
$ hg commit -m commit-12 ../dir ../dir2
abort: dir2: no match under directory!
[255]
[10]
$ hg -v commit -m commit-13 ../dir
committing files:
dir/file
......@@ -96,20 +96,20 @@ commit added file that has been deleted
$ hg commit -m commit-14 does-not-exist
abort: does-not-exist: * (glob)
[255]
[10]
#if symlink
$ ln -s foo baz
$ hg commit -m commit-15 baz
abort: baz: file not tracked!
[255]
[10]
$ rm baz
#endif
$ touch quux
$ hg commit -m commit-16 quux
abort: quux: file not tracked!
[255]
[10]
$ echo >> dir/file
$ hg -v commit -m commit-17 dir/file
committing files:
......
......@@ -412,7 +412,7 @@ Committing directories containing only largefiles.
$ hg revert --quiet z
$ hg commit -m "Empty subdir" z
abort: z: no match under directory!
[255]
[10]
$ rm -rf z
$ hg ci -m "standin" .hglf
abort: file ".hglf" is a largefile standin
......
......@@ -198,7 +198,7 @@ commit and update back
$ ln -s nothing dangling
$ hg commit -m 'commit symlink without adding' dangling
abort: dangling: file not tracked!
[255]
[10]
$ hg add dangling
$ hg commit -m 'add symlink'
......
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