D5813: revset: add expect to check the size of a set

Yuya Nishihara yuya at tcha.org
Mon Feb 11 08:23:48 EST 2019


>   nit-pick is resolved. `getintrange()` will throw a `ParseError` on setting size to one of `min:`, `:max` or `:`. In ideal case, on calling from `expectsize()` it shouldn't fail.

So you need to pass in the default min/max values to `getintrange()`.
The default min can be just `0`. The default max can be `len(repo) + 1`
(i.e. # of null:tip) for example, or `None` and test `maxsize is not None`
explicitly.


More information about the Mercurial-devel mailing list