diff mercurial/dispatch.py @ 46118:db5dddb38f5b

errors: raise InputError on early parse error in dispatch I didn't think this would have any effect on the tests, but it does because the catching in `scmutil.callcatch()` still happens. That's because `dispatch` passes in the function that includes the parsing as an argument to that function. I initially used `ConfigError` here but Matt Harbison convinced me to use `InputError`. I think that makes sense since error is not in a config file. Differential Revision: https://phab.mercurial-scm.org/D9387
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 23 Nov 2020 10:38:05 -0800
parents 49b6910217f9
children d04c0e494cfe
line wrap: on
line diff
--- a/mercurial/dispatch.py	Wed Nov 18 23:37:09 2020 -0800
+++ b/mercurial/dispatch.py	Mon Nov 23 10:38:05 2020 -0800
@@ -849,7 +849,7 @@
             ui.setconfig(section, name, value, b'--config')
             configs.append((section, name, value))
         except (IndexError, ValueError):
-            raise error.Abort(
+            raise error.InputError(
                 _(
                     b'malformed --config option: %r '
                     b'(use --config section.name=value)'