comparison tests/test-commandserver.t @ 45826:21733e8c924f

errors: add config that lets user get more detailed exit codes This adds an experimental config that lets the user get more detailed exit codes. For example, there will be a specific error code for input/user errors. This is part of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. I've made the config part of tweakdefaults. I've made the config enabled by default in tests. My reasoning is that we want to see that each specific error case gives the right exit code and we don't want to duplicate all error cases in the entire test suite. It also makes it easy to grep the `.t` files for `[255]` to find which cases we have left to fix. The logic for the current exit codes is quite simple, so I'm not too worried about regressions there. I've added a test case specifically for the "legacy" exit codes. I've set the detailed exit status only for the case of `InterventionRequired` and `SystemExit` for now (the cases where we currently return something other than 255), just to show that it works. Differential Revision: https://phab.mercurial-scm.org/D9238
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 21 Oct 2020 19:00:16 -0700
parents ed84a4d48910
children 8d72e29ad1e0
comparison
equal deleted inserted replaced
45825:8f07f5a9c3de 45826:21733e8c924f
209 extensions.fsmonitor= (fsmonitor !) 209 extensions.fsmonitor= (fsmonitor !)
210 largefiles.usercache=$TESTTMP/.cache/largefiles 210 largefiles.usercache=$TESTTMP/.cache/largefiles
211 lfs.usercache=$TESTTMP/.cache/lfs 211 lfs.usercache=$TESTTMP/.cache/lfs
212 ui.slash=True 212 ui.slash=True
213 ui.interactive=False 213 ui.interactive=False
214 ui.detailed-exit-code=True
214 ui.merge=internal:merge 215 ui.merge=internal:merge
215 ui.mergemarkers=detailed 216 ui.mergemarkers=detailed
216 ui.foo=bar 217 ui.foo=bar
217 ui.nontty=true 218 ui.nontty=true
218 web.address=localhost 219 web.address=localhost
220 web.server-header=testing stub value 221 web.server-header=testing stub value
221 *** runcommand init foo 222 *** runcommand init foo
222 *** runcommand -R foo showconfig ui defaults 223 *** runcommand -R foo showconfig ui defaults
223 ui.slash=True 224 ui.slash=True
224 ui.interactive=False 225 ui.interactive=False
226 ui.detailed-exit-code=True
225 ui.merge=internal:merge 227 ui.merge=internal:merge
226 ui.mergemarkers=detailed 228 ui.mergemarkers=detailed
227 ui.nontty=true 229 ui.nontty=true
228 #endif 230 #endif
229 231