( )⚙ D4579 basestore: stop looking at the Nth item of an N-length revlog

This is an archive of the discontinued Mercurial Phabricator instance.

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

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



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

rFBHGX Facebook Mercurial Extensions
Automatic diff as part of commit; lint not applicable.
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.

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

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.