( )⚙ D10737 errors: make InterventionRequired subclass Abort

This is an archive of the discontinued Mercurial Phabricator instance.

errors: make InterventionRequired subclass Abort
ClosedPublic

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

Details

Summary

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

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

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.