Page MenuHomePhabricator

basestore: stop looking at the Nth item of an N-length revlog
ClosedPublic

Authored by durin42 on Sep 13 2018, 3:02 PM.

Details

Summary

That's off the end of the revlog, and previously I think this was
getting lucky because the off-the-end spot was occupied by the nullrev
or something like that.

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durin42 created this revision.Sep 13 2018, 3:02 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptSep 13 2018, 3:02 PM
indygreg added inline comments.
remotefilelog/basestore.py
162

This should be using cl.revs(), which does support reverse iteration if the start rev is larger than end rev.

quark accepted this revision.Sep 13 2018, 3:32 PM
This revision is now accepted and ready to land.Sep 13 2018, 3:32 PM
quark added inline comments.Sep 13 2018, 3:40 PM
remotefilelog/basestore.py
162

Good suggestion!

This revision was automatically updated to reflect the committed changes.

Probably a consequence of https://www.mercurial-scm.org/repo/hg/rev/a3dacabd476b or some other commit in that series.