This is an archive of the discontinued Mercurial Phabricator instance.

index: don't include nullid in the internal "length" field
ClosedPublic

Authored by martinvonz on Aug 9 2018, 3:27 AM.

Details

Summary

This is a follow-up to 781b2720d2ac (index: don't include nullid in
len(), 2018-07-20). I intentionally didn't update the "index stats",
so it will also not include the space for nullid after this patch.

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 9 2018, 3:27 AM
durin42 added a subscriber: durin42.Aug 9 2018, 2:25 PM

Can I interest you in adding a test for len(index) to test-parseindex2.py? I suspect we have some differences between pure and C code right now...

Can I interest you in adding a test for len(index) to test-parseindex2.py? I suspect we have some differences between pure and C code right now...

Ah, that test is already failing. I sent D4241 to fix that. I think it already checks the length via the == operator (i.e. py_res_1 != c_res_1 would have failed if the length didn't match).

Reviewers may also find my series rooted at D4181 interesting.

This revision was automatically updated to reflect the committed changes.