Mercurial > hg
diff rust/hg-cpython/src/dirstate/dirstate_map.rs @ 48421:2097f63575a5
rhg: Add Repo::write_dirstate
This method is not used yet. It saves to disk any mutation that was done to
the `Repo`’s dirstate through `Repo::dirstate_map_mut`. It takes care of
dirstate-v1 v.s. dirstate-v2, dockets, data files, appending when possible,
etc.
Differential Revision: https://phab.mercurial-scm.org/D11839
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Thu, 02 Dec 2021 15:10:03 +0100 |
parents | c1b633db67fc |
children | dd6b67d5c256 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Thu Dec 02 12:05:36 2021 +0100 +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Thu Dec 02 15:10:03 2021 +0100 @@ -222,7 +222,7 @@ match result { Ok((packed, tree_metadata, append)) => { let packed = PyBytes::new(py, &packed); - let tree_metadata = PyBytes::new(py, &tree_metadata); + let tree_metadata = PyBytes::new(py, tree_metadata.as_bytes()); let tuple = (packed, tree_metadata, append); Ok(tuple.to_py_object(py).into_object()) },