Show More
@@ -14,8 +14,8 b' use std::time::Duration;' | |||
|
14 | 14 | |
|
15 | 15 | use cpython::{ |
|
16 | 16 | exc, ObjectProtocol, PyBool, PyBytes, PyClone, PyDict, PyErr, PyList, |
|
17 |
PyObject, PyResult, PyString, PyTuple, Python, PythonObject, |
|
|
18 | UnsafePyLeaked, | |
|
17 | PyObject, PyResult, PySet, PyString, PyTuple, Python, PythonObject, | |
|
18 | ToPyObject, UnsafePyLeaked, | |
|
19 | 19 | }; |
|
20 | 20 | |
|
21 | 21 | use crate::{ |
@@ -175,18 +175,11 b' py_class!(pub class DirstateMap |py| {' | |||
|
175 | 175 | let (_, other_parent) = |
|
176 | 176 | inner_shared.get_non_normal_other_parent_entries(); |
|
177 | 177 | |
|
178 |
let |
|
|
179 | locals.set_item( | |
|
180 | py, | |
|
181 | "other_parent", | |
|
182 | other_parent | |
|
183 | .iter() | |
|
184 | .map(|v| PyBytes::new(py, v.as_bytes())) | |
|
185 | .collect::<Vec<PyBytes>>() | |
|
186 | .to_py_object(py), | |
|
187 | )?; | |
|
188 | ||
|
189 | py.eval("set(other_parent)", None, Some(&locals)) | |
|
178 | let set = PySet::empty(py)?; | |
|
179 | for path in other_parent.iter() { | |
|
180 | set.add(py, PyBytes::new(py, path.as_bytes()))?; | |
|
181 | } | |
|
182 | Ok(set.into_object()) | |
|
190 | 183 | } |
|
191 | 184 | |
|
192 | 185 | def non_normal_entries(&self) -> PyResult<NonNormalEntries> { |
General Comments 0
You need to be logged in to leave comments.
Login now