Mercurial > hg
diff tests/test-revset.t @ 48116:5ced12cfa41b
errors: raise InputError on bad revset to revrange() iff provided by the user
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.
Differential Revision: https://phab.mercurial-scm.org/D11560
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 28 Sep 2021 08:47:11 -0700 |
parents | 56d441256e82 |
children | 8c4881c07f57 |
line wrap: on
line diff
--- a/tests/test-revset.t Tue Sep 28 09:08:43 2021 -0700 +++ b/tests/test-revset.t Tue Sep 28 08:47:11 2021 -0700 @@ -407,7 +407,7 @@ [10] $ log 'date' abort: unknown revision 'date' - [255] + [10] $ log 'date(' hg: parse error at 5: not a prefix: end (date( @@ -421,10 +421,10 @@ [10] $ log '0:date' abort: unknown revision 'date' - [255] + [10] $ log '::"date"' abort: unknown revision 'date' - [255] + [10] $ hg book date -r 4 $ log '0:date' 0 @@ -3067,7 +3067,7 @@ 0 $ log 'expectsize(0:1, 1)' abort: revset size mismatch. expected 1, got 2 - [255] + [10] $ log 'expectsize(0:4, -1)' hg: parse error: negative size [10] @@ -3077,7 +3077,7 @@ 2 $ log 'expectsize(0:1, 3:5)' abort: revset size mismatch. expected between 3 and 5, got 2 - [255] + [10] $ log 'expectsize(0:1, -1:2)' hg: parse error: negative size [10] @@ -3104,10 +3104,10 @@ 2 $ log 'expectsize(0:2, 4:)' abort: revset size mismatch. expected between 4 and 11, got 3 - [255] + [10] $ log 'expectsize(0:2, :2)' abort: revset size mismatch. expected between 0 and 2, got 3 - [255] + [10] Test getting list of node from file