Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG96ea4db4741b: rhg: fix a crash on non-generaldelta revlogs
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
While working on comments I discovered that the rust implementation was different from the C/Python implementation in how it deals with a wrong value of delta chain base.
I made sure that rust code behaves the same as hg there (which is: ignore the corruption) and added a test that checks that.
I was about to come back to this and talk about the same bug you found. So all good, thanks for spotting it!
The last test is a bit fragile, we should gate it for revlog-v1 only.
rust/hg-core/src/revlog/revlog.rs | ||
---|---|---|
315 | Might as well address this at the same time |
I thought we had a revlog-v2 in hghave but we don't. Don't worry about it then, we'll come to it when we come back around to revlog-v2 work. I'll amend the docstring.
I don't know about revlog-v1 (it seems there are tests in the tree that are revlog-v1-specific and don't gate against it), but (the lack of) zstd compression is also changing the result, so clearly needs to be guarded against, since it's breaking the --pure build.
I pushed that change. If you have ideas how to make the test less fragile, those would be appreciated. One possibility is to remove the test of corrupted repo altogether, if you think that's better.
I tried to test the series before your last update and it was well in the red (https://foss.heptapod.net/mercurial/mercurial-devel/-/pipelines/30072), and it looks like it's not limited to pure builds. Please test your series through the CI next time.
I think we can forgo that test, it's more trouble than it's worth.
The shell strikes again. :-\
I removed the problematic test, so it should be good now.
I tested the series through a CI as originally submitted, but of course new issues were introduced while it was in review.
Sorry, I need to develop some workflow that allows me to push both to phabricator and to a repo with a CI. Currently I can only do one or the other.
Heptapod's CI will re-send revisions with a differential revision attached to them on pipeline success. Unfortunately, the Windows CI is *very* flaky as of now, which is something we're trying to tackle at the moment.
Believe me, no one is more aggravated than me by the current submission/review workflow.
I'll take a look at your patches later, thank you for re-sending fast.
I'm not sure I understand the point of the hashing done at the very end of the tests: this even causes an issue for Windows for no real reason (rhg doesn't work on Windows yet, but still). Couldn't we just output the file?
The point is to make the output smaller.
Seems ok to output the whole file, too (pushed). (it was 50 lines, not 20, when I introduced it)
These changes should be absorbed into the previous changeset