hgweb: pass nodefunc to the revnav object
The issue between hgweb and filtering lay in this function. Moving it into the
object itself helps to abstract the erroneous bit.
hgweb: move revnavgen into an object
For later compatibility with changelog filtering some part of the navigation
generation logic will be altered. Those altered part will be different when in
the changelog case and in the filelog case. Moving this into an object will
allow to use inheritance to override just the part of the logic we need.
The aimed logic are for example:
- generation of revision 'hex' (different logic for changelog and filelog)
- revlog emptyness test
- fetching of the first revision of a revlog (may not be 0)
hgweb: `limit` argument is actually `latestonly` renames and enforce
The `limit` argument of several generator have only two possible values in
practice: 0 and 1. We rename this parameter to `latestonly` and simplify it's
handling.
The simplification allows us to save fetching of data that we are sure to not
consume.
Having a function minimal function perimeter will helps future refactoring.
hgweb: add test regarding filtering and hgweb
Since
4d1671b39168 hgweb is broken with filtering. This changeset add test that
should pass once it is fixed. Test currently broken are commented and will be
uncommented by changeset that fix them.
The filelog test is currently passing because we already have some hack in core
regarding filelog (see
518c1403838f).