Page MenuHomePhabricator

errors: make InterventionRequired subclass Abort

Authored by martinvonz on May 19 2021, 1:47 AM.



The docstring for Abort says that it's for errors raised by commands
and InterventionRequired is definitely something raised by commands,
so it seems that it should be an Abort. This patch makes it so. It
adds a coarse_exit_code (in addition to the already existing
detailed_exit_code) to Abort to achieve that, since
InterventionRequired should result in a special exit code even when
the ui.detailed-exit-code config is not set.

Diff Detail

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

Event Timeline

martinvonz created this revision.May 19 2021, 1:47 AM
pulkit accepted this revision.May 20 2021, 4:42 AM
This revision is now accepted and ready to land.May 20 2021, 4:42 AM
This revision was automatically updated to reflect the committed changes.