[Updated] D8937: rust: enable on macOS
danchr (Dan Villiom Podlaski Christiansen)
phabricator at mercurial-scm.org
Mon Aug 24 19:52:17 UTC 2020
danchr edited the summary of this revision.
danchr updated this revision to Diff 22434.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8937?vs=22416&id=22434
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8937/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8937
AFFECTED FILES
rust/hg-core/src/lib.rs
rust/hg-cpython/src/dirstate/dirstate_map.rs
CHANGE DETAILS
diff --git a/rust/hg-cpython/src/dirstate/dirstate_map.rs b/rust/hg-cpython/src/dirstate/dirstate_map.rs
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs
+++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs
@@ -350,8 +350,8 @@
{
dict.set_item(
py,
- key.as_bytes().to_vec(),
- value.as_bytes().to_vec(),
+ PyBytes::new(py, key.as_bytes()).into_object(),
+ PyBytes::new(py, value.as_bytes()).into_object(),
)?;
}
Ok(dict)
diff --git a/rust/hg-core/src/lib.rs b/rust/hg-core/src/lib.rs
--- a/rust/hg-core/src/lib.rs
+++ b/rust/hg-core/src/lib.rs
@@ -26,11 +26,10 @@
pub mod operations;
pub mod utils;
-// Remove this to see (potential) non-artificial compile failures. MacOS
-// *should* compile, but fail to compile tests for example as of 2020-03-06
-#[cfg(not(target_os = "linux"))]
+// Remove this to see (potential) non-artificial compile failures.
+#[cfg(not(any(target_os = "linux", target_os = "macos")))]
compile_error!(
- "`hg-core` has only been tested on Linux and will most \
+ "`hg-core` has only been tested on Linux and macOS and will most \
likely not behave correctly on other platforms."
);
To: danchr, #hg-reviewers, Alphare
Cc: Alphare, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200824/0cd27355/attachment-0002.html>
More information about the Mercurial-patches
mailing list