Mercurial > hg
comparison tests/test-win32text.t @ 46417:768056549737
errors: use exit code 40 for when a hook fails
A hook can be used for checking inputs, state, configuration,
security, etc., so it's unclear which of the existing exit codes to
use. Let's instead add one specifically for failed hooks. I picked 40.
Differential Revision: https://phab.mercurial-scm.org/D9910
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 29 Jan 2021 12:16:55 -0800 |
parents | d7304434390f |
children | 9f1b9e128788 |
comparison
equal
deleted
inserted
replaced
46416:bc3f3b59d0a4 | 46417:768056549737 |
---|---|
36 attempt to commit or push text file(s) using CRLF line endings | 36 attempt to commit or push text file(s) using CRLF line endings |
37 in f583ea08d42a: f | 37 in f583ea08d42a: f |
38 transaction abort! | 38 transaction abort! |
39 rollback completed | 39 rollback completed |
40 abort: pretxncommit.crlf hook failed | 40 abort: pretxncommit.crlf hook failed |
41 [255] | 41 [40] |
42 | 42 |
43 $ mv .hg/hgrc .hg/hgrc.bak | 43 $ mv .hg/hgrc .hg/hgrc.bak |
44 | 44 |
45 commits should succeed | 45 commits should succeed |
46 | 46 |
75 [decode] | 75 [decode] |
76 ** = cleverdecode: | 76 ** = cleverdecode: |
77 transaction abort! | 77 transaction abort! |
78 rollback completed | 78 rollback completed |
79 abort: pretxnchangegroup.crlf hook failed | 79 abort: pretxnchangegroup.crlf hook failed |
80 [255] | 80 [40] |
81 | 81 |
82 $ mv .hg/hgrc.bak .hg/hgrc | 82 $ mv .hg/hgrc.bak .hg/hgrc |
83 $ echo hello > f | 83 $ echo hello > f |
84 $ hg rm g | 84 $ hg rm g |
85 | 85 |
107 attempt to commit or push text file(s) using CRLF line endings | 107 attempt to commit or push text file(s) using CRLF line endings |
108 in 053ba1a3035a: d/f2 | 108 in 053ba1a3035a: d/f2 |
109 transaction abort! | 109 transaction abort! |
110 rollback completed | 110 rollback completed |
111 abort: pretxncommit.crlf hook failed | 111 abort: pretxncommit.crlf hook failed |
112 [255] | 112 [40] |
113 $ hg revert -a | 113 $ hg revert -a |
114 forgetting d/f2 | 114 forgetting d/f2 |
115 $ rm d/f2 | 115 $ rm d/f2 |
116 | 116 |
117 $ hg rem f | 117 $ hg rem f |
284 [decode] | 284 [decode] |
285 ** = cleverdecode: | 285 ** = cleverdecode: |
286 transaction abort! | 286 transaction abort! |
287 rollback completed | 287 rollback completed |
288 abort: pretxnchangegroup.crlf hook failed | 288 abort: pretxnchangegroup.crlf hook failed |
289 [255] | 289 [40] |
290 | 290 |
291 $ hg log -v | 291 $ hg log -v |
292 changeset: 5:f0b1c8d75fce | 292 changeset: 5:f0b1c8d75fce |
293 tag: tip | 293 tag: tip |
294 user: test | 294 user: test |