Blob Blame History Raw
# HG changeset patch
# Parent  5bd6bcd31dd1ebb63b8914b00064f96297267af7
Patch cargo metadata for Fedora build

Backport upstream 6.2 changes to 6.1:
 - update memmap2 to 0.5.3 (upstream ec8d9b5a5e7c)
 - update micro-timer to 0.4.0 (upstream 8848c3453661, ec8d9b5a5e7c)

Update zstd to 0.10.0 (upstream is stuck on 0.5 because MSRV)
 - adapt for breaking changes in zstd 0.10.0

Downgrade ouroboros to 0.13.0 (Fedora packaging needs update - rhbz#2027028)

Work around narrow constraint on im-rc - https://www.mercurial-scm.org/pipermail/mercurial-devel/2022-May/148500.html

diff --git a/rust/hg-core/Cargo.toml b/rust/hg-core/Cargo.toml
--- a/rust/hg-core/Cargo.toml
+++ b/rust/hg-core/Cargo.toml
@@ -29,10 +29,10 @@ twox-hash = "1.5.0"
 same-file = "1.0.6"
 tempfile = "3.1.0"
 crossbeam-channel = "0.4"
-micro-timer = "0.3.0"
+micro-timer = "0.4.0"
 log = "0.4.8"
-memmap2 = {version = "0.4", features = ["stable_deref_trait"]}
-zstd = "0.5.3"
+memmap2 = {version = "0.5.3", features = ["stable_deref_trait"]}
+zstd = "0.10"
 format-bytes = "0.3.0"
 
 # We don't use the `miniz-oxide` backend to not change rhg benchmarks and until

diff --git a/rust/hg-core/src/revlog/revlog.rs b/rust/hg-core/src/revlog/revlog.rs
--- a/rust/hg-core/src/revlog/revlog.rs
+++ b/rust/hg-core/src/revlog/revlog.rs
@@ -431,7 +431,7 @@ impl<'a> RevlogEntry<'a> {
         } else {
             let cap = self.uncompressed_len.max(0) as usize;
             let mut buf = vec![0; cap];
-            let len = zstd::block::decompress_to_buffer(self.bytes, &mut buf)
+            let len = zstd::bulk::decompress_to_buffer(self.bytes, &mut buf)
                 .map_err(|_| corrupted())?;
             if len != self.uncompressed_len as usize {
                 Err(corrupted())

diff --git a/rust/rhg/Cargo.toml b/rust/rhg/Cargo.toml
--- a/rust/rhg/Cargo.toml
+++ b/rust/rhg/Cargo.toml
@@ -16,7 +16,7 @@ derive_more = "0.99"
 home = "0.5.3"
 lazy_static = "1.4.0"
 log = "0.4.11"
-micro-timer = "0.3.1"
+micro-timer = "0.4.0"
 regex = "1.3.9"
 env_logger = "0.7.1"
 format-bytes = "0.3.0"