rust/hg-cpython/src/dirstate/dirstate_map.rs
changeset 47351 3b9914b28133
parent 47335 ed1583a845d2
child 47477 eb416759af7e
equal deleted inserted replaced
47350:04d1f17f49e7 47351:3b9914b28133
   533             py,
   533             py,
   534             unsafe { leaked_ref.map(py, |o| o.copy_map_iter()) },
   534             unsafe { leaked_ref.map(py, |o| o.copy_map_iter()) },
   535         )
   535         )
   536     }
   536     }
   537 
   537 
       
   538     def directories(&self) -> PyResult<PyList> {
       
   539         let dirs = PyList::new(py, &[]);
       
   540         for item in self.inner(py).borrow().iter_directories() {
       
   541             let (path, mtime) = item.map_err(|e| v2_error(py, e))?;
       
   542             let path = PyBytes::new(py, path.as_bytes());
       
   543             let mtime = mtime.map(|t| t.0).unwrap_or(-1);
       
   544             let tuple = (path, (b'd', 0, 0, mtime));
       
   545             dirs.append(py, tuple.to_py_object(py).into_object())
       
   546         }
       
   547         Ok(dirs)
       
   548     }
       
   549 
   538 });
   550 });
   539 
   551 
   540 impl DirstateMap {
   552 impl DirstateMap {
   541     pub fn get_inner_mut<'a>(
   553     pub fn get_inner_mut<'a>(
   542         &'a self,
   554         &'a self,