Check that the hash of the data reconstructed from deltas
matches the hash stored in the revision.
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHGb0d6309ff50c: hg-core: check data integrity in `Revlog`
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
Both remarks are nits and can be addressed later if need be, this looks good otherwise.
rust/hg-core/src/revlog/revlog.rs | ||
---|---|---|
19 | We have at least two other definitions of this in the Rust code. hg-core/src/dirstate/dirstate_map.rs and `hg-core/src/revlog/node.rs. It would be better to factor these out. If you want to do it in a follow-up I understand (less churn). | |
292 | Same as above, reuse the 20 constant from somewhere else |
rust/hg-core/src/revlog/revlog.rs | ||
---|---|---|
19 | did not found NULL_ID because it's about the node so I searched in hg-core/src/revlog/node.rs with no luck. | |
292 | well hg-core/src/dirstate/dirstate_map.rs did not reuse the 20 constant from somewhere else (aka revlog::node::NODE_BYTES_LENGTH) . Not to say that it should not be done, but that staying aware of all existing constants from somewhere else is not that simple. proposal: have NULL_NODE_ID in the same place than NODE_BYTES_LENGTH and have them public. |
We have at least two other definitions of this in the Rust code. hg-core/src/dirstate/dirstate_map.rs and `hg-core/src/revlog/node.rs. It would be better to factor these out. If you want to do it in a follow-up I understand (less churn).