obsolete: replace "nb" notation with "num" (for "number")

As requested by Matt Mackall.

--HG--
extra : rebase_source : b9e4d63a93a6a7a921d496d0a0a5d1855ce0fb7f
revset: use a single return statement in matcher function

This makes it easy to insert post processing and debug code on the returned
value.

--HG--
extra : rebase_source : a71448cc00d491c61799c069d4554620f450e808
revset: use direct access to __contains__ in spanset.__sub__

Using `x.__contains__(r)` instead of `r in x` does not matter for built-in type
(set) but have a positive impact for all other classes. This will let us drop
some usage of baseset.set() in future patches. This also probably improves some
performance.

--HG--
extra : rebase_source : cec41470750a9e822593dc36061cb6b4a1fc9a4a
revset: drop isinstance(baseset) from baseset.__and__

As baseset now has a fast __contains___ operator, this `baseset.set()` dance is
no longer needed. No regressions are visible in the benchmark.

--HG--
extra : rebase_source : 4d91f503f09f47dab486305b97e6d13185dd365b
revset: drop isinstance(baseset) in spanset.__and__

As baseset now has a fast __contains___ operator, this `baseset.set()` dance is no
longer needed. No regressions are visible in the benchmark.

--HG--
extra : rebase_source : f308ddea1d5505db06fe507c40a782a2649711c2
revset: drop isinstance(baseset) in spanset.__sub__

As baseset now has a fast __contains___ operator, this `baseset.set()` dance is no
longer needed. No regressions are visible in the benchmark.

--HG--
extra : rebase_source : 97ea593ed505a82323e53cac7e0def877279264e
revset: add a `__nonzero__` to baseset

We are about to add a base class for `baseset` with an abstract `__nonzero__`
method. So we need this method to be explicitly defined to avoid issues. The
built-in list object apparently does not have a `__nonzero__` and relies on
`__len__` for this purpose?

--HG--
extra : rebase_source : 01263e698c7b5f3471e4a6c49e4b29f7cb8372fb
revset: introduce an abstractsmartset class

This class documents all methods required by a smartset. This makes it easier
for people to respect the API and ensure we fail loudly when something does
not. It will later also contain common default implementations for multiple
methods, making it easier to have smartset classes with minimal work.

--HG--
extra : rebase_source : d2dd7fc29c9617a65febbc84ee978fc5cd33c3f2