This is an archive of the discontinued Mercurial Phabricator instance.

errors: use exit code 40 for when a hook fails
ClosedPublic

Authored by martinvonz on Jan 29 2021, 5:46 PM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Jan 29 2021, 5:46 PM
pulkit accepted this revision.Jan 31 2021, 1:15 PM
pulkit added a subscriber: pulkit.

Reviewing this patch made me realize that we don't have any help for exit codes. Might be a good idea to have hg help exitcodes or something similar.

This revision is now accepted and ready to land.Jan 31 2021, 1:15 PM
This revision was automatically updated to reflect the committed changes.