diff mercurial/scmutil.py @ 45863:3175b0e0058b

errors: use InputError for errors about bad paths Differential Revision: https://phab.mercurial-scm.org/D9326
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 12 Nov 2020 09:53:14 -0800
parents bff719525815
children f96fa4de5055
line wrap: on
line diff
--- a/mercurial/scmutil.py	Tue Nov 10 09:14:01 2020 -0800
+++ b/mercurial/scmutil.py	Thu Nov 12 09:53:14 2020 -0800
@@ -311,7 +311,7 @@
 def checkfilename(f):
     '''Check that the filename f is an acceptable filename for a tracked file'''
     if b'\r' in f or b'\n' in f:
-        raise error.Abort(
+        raise error.InputError(
             _(b"'\\n' and '\\r' disallowed in filenames: %r")
             % pycompat.bytestr(f)
         )
@@ -326,7 +326,7 @@
         if msg:
             msg = b"%s: %s" % (msg, procutil.shellquote(f))
             if abort:
-                raise error.Abort(msg)
+                raise error.InputError(msg)
             ui.warn(_(b"warning: %s\n") % msg)