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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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