rust/hg-cpython/src/dirstate/dirstate_map.rs
changeset 49111 8a17fc501eda
parent 49108 119c7e2b4248
child 49112 a55934393078
equal deleted inserted replaced
49110:4d3f6767319f 49111:8a17fc501eda
   231             Err(PyErr::new::<exc::OSError, _>(py, "Dirstate error".to_string()))
   231             Err(PyErr::new::<exc::OSError, _>(py, "Dirstate error".to_string()))
   232         })?;
   232         })?;
   233         Ok(PyNone)
   233         Ok(PyNone)
   234     }
   234     }
   235 
   235 
   236     def removefile(
       
   237         &self,
       
   238         f: PyObject,
       
   239         in_merge: PyObject
       
   240     ) -> PyResult<PyObject> {
       
   241         self.inner(py).borrow_mut()
       
   242             .remove_file(
       
   243                 HgPath::new(f.extract::<PyBytes>(py)?.data(py)),
       
   244                 in_merge.extract::<PyBool>(py)?.is_true(),
       
   245             )
       
   246             .or_else(|_| {
       
   247                 Err(PyErr::new::<exc::OSError, _>(
       
   248                     py,
       
   249                     "Dirstate error".to_string(),
       
   250                 ))
       
   251             })?;
       
   252         Ok(py.None())
       
   253     }
       
   254 
       
   255     def drop_item_and_copy_source(
   236     def drop_item_and_copy_source(
   256         &self,
   237         &self,
   257         f: PyBytes,
   238         f: PyBytes,
   258     ) -> PyResult<PyNone> {
   239     ) -> PyResult<PyNone> {
   259         self.inner(py)
   240         self.inner(py)