( )⚙ D7248 repoview: avoid wrapping changelog if there's nothing to filter

This is an archive of the discontinued Mercurial Phabricator instance.

repoview: avoid wrapping changelog if there's nothing to filter
ClosedPublic

Authored by martinvonz on Nov 5 2019, 7:59 PM.

Details

Summary

This simplifies the code a bit by moving the optimizaton for no
filtered revisions to one place. I assume it also makes working with
repos without obsmarkers a little faster, but it doesn't seem
significant.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

martinvonz created this revision.Nov 5 2019, 7:59 PM
indygreg accepted this revision.Nov 5 2019, 10:35 PM
indygreg added a subscriber: indygreg.

Nice series.

The only thing that I would consider changing is moving the class definition out of a function so it can more easily be monkeypatched. We can always construct a new type using the generic class as a base to facilitate wrapping the changelog. The code in localrepo.py for deriving a custom repo type could be used as inspiration.

This revision is now accepted and ready to land.Nov 5 2019, 10:35 PM