This is an archive of the discontinued Mercurial Phabricator instance.

store: error out if fncache does not ends with a newline
ClosedPublic

Authored by pulkit on Mar 18 2019, 9:57 AM.

Details

Summary

If fncache does not ends with a newline, chunk will not be fully consumed. It
should be a bug somewhere or the fncache is corrupted if that happens. Let's
error out in such cases.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Mar 18 2019, 9:57 AM
martinvonz added inline comments.
mercurial/store.py
485

I'll s/ends/end/ in flight

This revision was automatically updated to reflect the committed changes.

Is there something that can be done to repair this, that should be suggested in the hint? I've seen fncache errors in the context of a corrupt repo, but I'm not sure what an end user would do with this message.

Good point. Isn't there a debug command for rebuilding it? We can add a
hint about that.