Page MenuHomePhabricator

index: handle index[-1] as nullid more explicitly
ClosedPublic

Authored by martinvonz on Aug 1 2018, 2:47 PM.

Details

Summary

I find it more intuitive to check if "pos == -1" than to first add the
index length (which includes one extra item for the nullid) and
compare that to "length - 1". However, because test-parseindex2.py
compares the whole index (up to len(index)-1), we need to also
preserve that other check for a little while more. I'll remove it
soon.

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.Aug 1 2018, 2:47 PM
martinvonz updated this revision to Diff 9777.Aug 2 2018, 12:40 AM
This revision was automatically updated to reflect the committed changes.