bundlerepo: inline inbundle()
It didn't make it faster, it didn't make the code smaller, it didn't make the
code simpler.
-1 is never in basemap.
bundlerepo: improve performance for bundle() revset expression
Create the set of revision numbers directly instead of creating a list of nodes
first.
bundlerepo: fix outdated comment
Comment was made invalid by
01ee43dda681.
hgweb: pass repo object to revnav construction
For compatibility with changelog filtering we need access to the changelog, a
simple nodefunc is not sufficient, only the changelog and repo have access the
filteredrevs information.
For the filerevnav version, we use an unfiltered changelog. Linkrev is currently
broken with filtering and we need some failsafe to prevent traceback. This is
the same approach as the one used in
518c1403838f. The use of
filectx.changectx() allowed the previous code to use the
518c1403838f hack.
This changeset may result in an incorrect behaviors, Navigation
link may point to missing revision. However this bad navigation
generation is much better than a plain crash
hgweb: introduction a filerevnav subclass
It'll be use to implement the file specific behavior.
hgweb: simplify the handling of empty repo
This abstraction have two advantages:
- If the revlog is empty, None of the code bellow is relevant,
early returns seems a win.
- Abtraction of the 'emptiness' check will help later when we stop relying on
nodefunc.
A bonus, with filtering, a non-empty revlog may not have '0' revision
accessible. It'll be easier to handle with the emptiness test in a dedicated
function
hgweb: move hex creation into an object method
This is clearer and allow later overwrite.