comparison tests/test-globalopts.t @ 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 ac565222b9f8
children bb3a5c0df06b
comparison
equal deleted inserted replaced
46117:6cc269bd1c29 46118:db5dddb38f5b
215 215
216 $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo 216 $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
217 quuxfoo 217 quuxfoo
218 $ hg --cwd c --config '' tip -q 218 $ hg --cwd c --config '' tip -q
219 abort: malformed --config option: '' (use --config section.name=value) 219 abort: malformed --config option: '' (use --config section.name=value)
220 [255] 220 [10]
221 $ hg --cwd c --config a.b tip -q 221 $ hg --cwd c --config a.b tip -q
222 abort: malformed --config option: 'a.b' (use --config section.name=value) 222 abort: malformed --config option: 'a.b' (use --config section.name=value)
223 [255] 223 [10]
224 $ hg --cwd c --config a tip -q 224 $ hg --cwd c --config a tip -q
225 abort: malformed --config option: 'a' (use --config section.name=value) 225 abort: malformed --config option: 'a' (use --config section.name=value)
226 [255] 226 [10]
227 $ hg --cwd c --config a.= tip -q 227 $ hg --cwd c --config a.= tip -q
228 abort: malformed --config option: 'a.=' (use --config section.name=value) 228 abort: malformed --config option: 'a.=' (use --config section.name=value)
229 [255] 229 [10]
230 $ hg --cwd c --config .b= tip -q 230 $ hg --cwd c --config .b= tip -q
231 abort: malformed --config option: '.b=' (use --config section.name=value) 231 abort: malformed --config option: '.b=' (use --config section.name=value)
232 [255] 232 [10]
233 233
234 Testing --debug: 234 Testing --debug:
235 235
236 $ hg --cwd c log --debug 236 $ hg --cwd c log --debug
237 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a 237 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a