rust/hg-cpython/src/dirstate/dirstate_map.rs
changeset 49106 c1a3fdedc492
parent 49104 b5c2aca84618
child 49108 119c7e2b4248
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs	Mon Mar 28 18:02:45 2022 +0200
+++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs	Mon Mar 28 18:09:01 2022 +0200
@@ -164,6 +164,16 @@
         Ok(PyNone)
     }
 
+    def set_possibly_dirty(&self, f: PyObject) -> PyResult<PyNone> {
+        let bytes = f.extract::<PyBytes>(py)?;
+        let path = HgPath::new(bytes.data(py));
+        let res = self.inner(py).borrow_mut().set_possibly_dirty(path);
+        res.or_else(|_| {
+            Err(PyErr::new::<exc::OSError, _>(py, "Dirstate error".to_string()))
+        })?;
+        Ok(PyNone)
+    }
+
     def reset_state(
         &self,
         f: PyObject,