rust: Add type annotation to fix inference on Rust Nightly
When compiling with Rust Nightly, the im-rs crate silently makes use of the
experimental language feature for trait impl specialization. This apperently
changes public its APIs in subtle ways such that type inference of some user
code can fail where it succeeds when specialization is disabled.
This made Mercurial’s Rust unit tests have compilation errors on Nightly.
I have not managed to find the exactl root cause, but I wrote down my findings
so far at https://github.com/bodil/im-rs/issues/188
This adds type annotation to make unit tests rely less on type inference
and work around the issue.
Differential Revision: https://phab.mercurial-scm.org/D10742
recover: only apply last journal record per file (
issue6423)
This got broken in 2019 when the size check was introduced. It is most
noticable when dealing with transactions that involve an inline to
non-inline revlog storage transaction. It wasn't seen as much at the
time because the in-memory journal actually de-duplicated the entry
implicity, but since
63edc384d3b7 the on-disk journal is used for
rollback as well as recover.
Differential Revision: https://phab.mercurial-scm.org/D10726
revlog: update data file record before index rename
When migrating from inline to non-inline data storage, the data file is
recorded initially as zero sized so that it is removed on failure. But
the record has to be updated before the index is renamed, otherwise
data is lost on rollback.
Differential Revision: https://phab.mercurial-scm.org/D10725