( )⚙ D5228 perf: fix perfrevlogrevisions --reverse

This is an archive of the discontinued Mercurial Phabricator instance.

perf: fix perfrevlogrevisions --reverse
ClosedPublic

Authored by lothiraldan on Nov 6 2018, 3:33 AM.

Details

Summary

Currently, 'endrev' equals len(revlog), a revision that does not exist.

When asking for the reverse order, the arguments passed to xrange are
xrange(len(revlog), startrev) which then crash.

We need to offset 'endrev' by one so we don't crash anymore. Also, we offset
'startrev' to ensure we get the same number of revisions with and without the
--reverse option.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

lothiraldan created this revision.Nov 6 2018, 3:33 AM
This revision was automatically updated to reflect the committed changes.