##// END OF EJS Templates
errors: set detailed exit code to 30 for config errors...
Martin von Zweigbergk -
r46445:bff71952 default
parent child Browse files
Show More
@@ -226,6 +226,8 b' def callcatch(ui, func):'
226 226 detailed_exit_code = 10
227 227 elif isinstance(inst, error.StateError):
228 228 detailed_exit_code = 20
229 elif isinstance(inst, error.ConfigError):
230 detailed_exit_code = 30
229 231 ui.error(_(b"abort: %s\n") % inst.message)
230 232 if inst.hint:
231 233 ui.error(_(b"(%s)\n") % inst.hint)
@@ -45,7 +45,7 b' should fail'
45 45 $ echo foo > con.xml
46 46 $ hg --config ui.portablefilenames=jump add con.xml
47 47 abort: ui.portablefilenames value is invalid ('jump')
48 [255]
48 [30]
49 49 $ hg --config ui.portablefilenames=abort add con.xml
50 50 abort: filename contains 'con', which is reserved on Windows: con.xml
51 51 [255]
@@ -333,7 +333,7 b' since bar is not touched in this commit,'
333 333 input validation
334 334 $ hg convert --config convert.git.similarity=foo --datesort git-repo2 fullrepo
335 335 abort: convert.git.similarity is not a valid integer ('foo')
336 [255]
336 [30]
337 337 $ hg convert --config convert.git.similarity=-1 --datesort git-repo2 fullrepo
338 338 abort: similarity must be between 0 and 100
339 339 [255]
@@ -139,7 +139,7 b" symlinks shouldn't be followed"
139 139 bad config
140 140 $ hg merge 1 --config merge.checkunknown=x
141 141 abort: merge.checkunknown not valid ('x' is none of 'abort', 'ignore', 'warn')
142 [255]
142 [30]
143 143 this merge should fail
144 144 $ hg merge 1 --config merge.checkunknown=abort
145 145 b: untracked file differs
@@ -513,7 +513,7 b' test invalid phase name'
513 513 transaction abort!
514 514 rollback completed
515 515 abort: phases.new-commit: not a valid phase name ('babar')
516 [255]
516 [30]
517 517 Test phase command
518 518 ===================
519 519
@@ -131,7 +131,7 b' Test error cases'
131 131 $ commitone zlib-level-invalid
132 132 abort: storage.revlog.zlib.level is not a valid integer ('foobar')
133 133 abort: storage.revlog.zlib.level is not a valid integer ('foobar')
134 [255]
134 [30]
135 135
136 136 $ hg init zlib-level-out-of-range
137 137 $ cat << EOF >> zlib-level-out-of-range/.hg/hgrc
@@ -188,7 +188,7 b' Test error cases'
188 188 $ commitone zstd-level-invalid
189 189 abort: storage.revlog.zstd.level is not a valid integer ('foobar')
190 190 abort: storage.revlog.zstd.level is not a valid integer ('foobar')
191 [255]
191 [30]
192 192
193 193 $ hg init zstd-level-out-of-range --config format.revlog-compression=zstd
194 194 $ cat << EOF >> zstd-level-out-of-range/.hg/hgrc
General Comments 0
You need to be logged in to leave comments. Login now