Mercurial > hg
comparison rust/hg-cpython/src/dirstate/dirstate_map.rs @ 49145:dd2503a63d33 stable
rust-dirstate-v2: save proper data size if no new data on append
This is currently only triggered with the tests ran with `--rhg` without
`--rust`, by "luck", there probably always was something to write, like an
mtime when also using Rust extensions alongside `rhg`.
Differential Revision: https://phab.mercurial-scm.org/D12580
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Thu, 21 Apr 2022 14:47:13 +0200 |
parents | dd6b67d5c256 |
children | 10b9f11daf15 |
comparison
equal
deleted
inserted
replaced
49068:90e564882f07 | 49145:dd2503a63d33 |
---|---|
209 can_append: bool, | 209 can_append: bool, |
210 ) -> PyResult<PyObject> { | 210 ) -> PyResult<PyObject> { |
211 let inner = self.inner(py).borrow(); | 211 let inner = self.inner(py).borrow(); |
212 let result = inner.pack_v2(can_append); | 212 let result = inner.pack_v2(can_append); |
213 match result { | 213 match result { |
214 Ok((packed, tree_metadata, append)) => { | 214 Ok((packed, tree_metadata, append, _old_data_size)) => { |
215 let packed = PyBytes::new(py, &packed); | 215 let packed = PyBytes::new(py, &packed); |
216 let tree_metadata = PyBytes::new(py, tree_metadata.as_bytes()); | 216 let tree_metadata = PyBytes::new(py, tree_metadata.as_bytes()); |
217 let tuple = (packed, tree_metadata, append); | 217 let tuple = (packed, tree_metadata, append); |
218 Ok(tuple.to_py_object(py).into_object()) | 218 Ok(tuple.to_py_object(py).into_object()) |
219 }, | 219 }, |