expectsize(<set>, <int>) revset fails if <set> is not exactly <int> elements.
expectsize(<set>, <min:max>) revset fails if <set> is not exactly between
<min> and <max> inclusive.
one(<set>) alias for expectsize(<set>, 1).
This then allows an alias for hg next to be update -r one(children(.))
with sane failure behavior, and also makes some other scripting tasks
a little less difficult.
(Summary from WeShouldDoThat)
Can you improve this documentation as a follow-up? We should mentioned about specifying ranges, and also if the set has the given size, that set is returned.