Mercurial > hg
diff rust/hg-cpython/src/dirstate/dirstate_map.rs @ 47567:7a15dea6d303
dirstate-item: also build DistateItem in dirstate.directories()
The rust code was building tuple.
Differential Revision: https://phab.mercurial-scm.org/D10983
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 05 Jul 2021 10:32:49 +0200 |
parents | 84391ddf4c78 |
children | ff97e793ed36 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Thu Jul 08 17:09:57 2021 -0400 +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Mon Jul 05 10:32:49 2021 +0200 @@ -19,6 +19,7 @@ use crate::{ dirstate::copymap::{CopyMap, CopyMapItemsIterator, CopyMapKeysIterator}, + dirstate::make_directory_item, dirstate::make_dirstate_item, dirstate::non_normal_entries::{ NonNormalEntries, NonNormalEntriesIterator, @@ -519,7 +520,8 @@ let (path, mtime) = item.map_err(|e| v2_error(py, e))?; let path = PyBytes::new(py, path.as_bytes()); let mtime = mtime.map(|t| t.0).unwrap_or(-1); - let tuple = (path, (b'd', 0, 0, mtime)); + let item = make_directory_item(py, mtime as i32)?; + let tuple = (path, item); dirs.append(py, tuple.to_py_object(py).into_object()) } Ok(dirs)