Page MenuHomePhabricator

errors: raise InputError on bad revset to revrange() iff provided by the user
ClosedPublic

Authored by martinvonz on Fri, Oct 1, 3:51 PM.

Details

Summary

Most callers of scmutil.revrange() pass in a revset provided by the
user. If there are problems resolving that, it should result in an
InputError and exit code 10 (when using detailed exit
codes). However, there are also some callers that pass in revsets not
provided by the user. InputError is not appropriate in those
cases. This patch therefore introduces a wrapper around
scmutil.revrange() that simply converts the exception type. I put it
in logcmdutil.py since that seems to be the lowest-level module in
the (poorly defined) UI layer.

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.