Page MenuHomePhabricator

tagcache: distinguish between invalid and missing entries
ClosedPublic

Authored by mharbison72 on Jan 17 2021, 4:54 PM.

Details

Summary

The TortoiseHg repo has typically not had a newly applied tag accessible by name
for recent releases, for unknown reasons. Deleting and rebuilding the tag cache
doesn't fix it, though deleting the cache and running hg log -r $new_tag does.
Eventually the situation does sort itself out for new clones from the server.
In an effort to figure out what the issue is, Pierre-Yves David suggested
listing these entries in the debug output more specifically.

This isn't complete yet- the second test change that says "missing" is more like
"invalid", since it was truncated. The problem there is the code that reads the
raw array truncates any partial records and then fills it with 0xFF, which
signifies that it is missing. As a side note, that means the check for the
length when validating an existing entry never fails.

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

mharbison72 created this revision.Jan 17 2021, 4:54 PM
Alphare accepted this revision.Jan 22 2021, 5:25 AM
Alphare added a subscriber: Alphare.

I'm always uncomfortable with a function that returns a value, None and False... but I suppose that for performance reasons we can't really do better. Where are your Rust enums when you need them? ;)

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.