[PATCH 3 of 3] revset: leverage getintrange() helper in relation-subscript operation (API)

Anton Shestakov av6 at dwimlabs.net
Thu Jan 31 10:25:26 EST 2019


On Thu, 31 Jan 2019 23:19:20 +0900
Yuya Nishihara <yuya at tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1548563857 -32400
> #      Sun Jan 27 13:37:37 2019 +0900
> # Node ID 4e7cb9965efc7921427418742ff2ca23f180b707
> # Parent  d5978ebfee5ac4ec9694c8d1a2df37c7e1555bd3
> revset: leverage getintrange() helper in relation-subscript operation (API)
> 
> Now a range expression is parsed by a relation function itself since the
> upper layer have no knowledge about the default first/last bounds.
> 
> --- a/tests/test-revset.t
> +++ b/tests/test-revset.t
> @@ -643,13 +643,13 @@ parse errors of relation, subscript and 
>    [255]
>  
>    $ hg debugrevspec '.#generations[a]'
> -  hg: parse error: relation subscript must be an integer
> +  hg: parse error: relation subscript must be an integer range
>    [255]

This doesn't feel right: it can totally be just one integer. I mean,
internally it's converted to range, but as a message to user the new
phrasing is less helpful.


More information about the Mercurial-devel mailing list