Mercurial > public > mercurial-scm > hg
diff tests/test-log.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 | 0c92cd9286ee |
children | 8c4881c07f57 |
line wrap: on
line diff
--- a/tests/test-log.t Tue Sep 28 09:08:43 2021 -0700 +++ b/tests/test-log.t Tue Sep 28 08:47:11 2021 -0700 @@ -5,13 +5,13 @@ $ hg log $ hg log -r 1 abort: unknown revision '1' - [255] + [10] $ hg log -r -1:0 abort: unknown revision '-1' - [255] + [10] $ hg log -r 'branch(name)' abort: unknown revision 'name' - [255] + [10] $ hg log -r null -q -1:000000000000 @@ -1104,7 +1104,7 @@ $ hg log -r 1000000000000000000000000000000000000000 abort: unknown revision '1000000000000000000000000000000000000000' - [255] + [10] log -k r1 @@ -2061,7 +2061,7 @@ $ hg log -r a abort: hidden revision 'a' is pruned (use --hidden to access hidden revisions) - [255] + [10] test that parent prevent a changeset to be hidden @@ -2125,7 +2125,7 @@ $ hg log -T'{rev}:{node}\n' -r:0 abort: hidden revision '0' is pruned (use --hidden to access hidden revisions) - [255] + [10] $ hg log -T'{rev}:{node}\n' -f 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e 2:94375ec45bddd2a824535fc04855bd058c926ec0