Page MenuHomePhabricator

py3: fix curses chunkselector fallback (when diffs are too large) on py3
ClosedPublic

Authored by spectral on Jan 16 2020, 3:20 PM.

Details

Summary

Previously we showed the message using Exception.message, which is removed in
py3. Since crecordmod.fallbackerror inherits from error.Abort, we can just use
b'%s' % exception to print the message. This does not print the hint, but
that's fine - we don't set one. We inherit from error.Abort so that if a
codepath doesn't handle fallback specially, it exits to the terminal with a sane
message instead of an unknown exception error.

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

spectral created this revision.Jan 16 2020, 3:20 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.