Mercurial > hg
comparison rust/hg-cpython/src/dirstate/status.rs @ 48391:b80e5e75d51e
dirstate: remove `lastnormaltime` mechanism
This is now redundant with the new, simpler `mtime_boundary` one.
Differential Revision: https://phab.mercurial-scm.org/D11795
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 25 Oct 2021 11:36:22 +0200 |
parents | 269ff8978086 |
children | 473af5cbc209 |
comparison
equal
deleted
inserted
replaced
48390:322525db4c98 | 48391:b80e5e75d51e |
---|---|
7 | 7 |
8 //! Bindings for the `hg::status` module provided by the | 8 //! Bindings for the `hg::status` module provided by the |
9 //! `hg-core` crate. From Python, this will be seen as | 9 //! `hg-core` crate. From Python, this will be seen as |
10 //! `rustext.dirstate.status`. | 10 //! `rustext.dirstate.status`. |
11 | 11 |
12 use crate::dirstate::item::timestamp; | |
13 use crate::{dirstate::DirstateMap, exceptions::FallbackError}; | 12 use crate::{dirstate::DirstateMap, exceptions::FallbackError}; |
14 use cpython::exc::OSError; | 13 use cpython::exc::OSError; |
15 use cpython::{ | 14 use cpython::{ |
16 exc::ValueError, ObjectProtocol, PyBytes, PyErr, PyList, PyObject, | 15 exc::ValueError, ObjectProtocol, PyBytes, PyErr, PyList, PyObject, |
17 PyResult, PyTuple, Python, PythonObject, ToPyObject, | 16 PyResult, PyTuple, Python, PythonObject, ToPyObject, |
101 dmap: DirstateMap, | 100 dmap: DirstateMap, |
102 matcher: PyObject, | 101 matcher: PyObject, |
103 root_dir: PyObject, | 102 root_dir: PyObject, |
104 ignore_files: PyList, | 103 ignore_files: PyList, |
105 check_exec: bool, | 104 check_exec: bool, |
106 last_normal_time: (u32, u32), | |
107 list_clean: bool, | 105 list_clean: bool, |
108 list_ignored: bool, | 106 list_ignored: bool, |
109 list_unknown: bool, | 107 list_unknown: bool, |
110 collect_traversed_dirs: bool, | 108 collect_traversed_dirs: bool, |
111 ) -> PyResult<PyTuple> { | 109 ) -> PyResult<PyTuple> { |
112 let last_normal_time = timestamp(py, last_normal_time)?; | |
113 let bytes = root_dir.extract::<PyBytes>(py)?; | 110 let bytes = root_dir.extract::<PyBytes>(py)?; |
114 let root_dir = get_path_from_bytes(bytes.data(py)); | 111 let root_dir = get_path_from_bytes(bytes.data(py)); |
115 | 112 |
116 let dmap: DirstateMap = dmap.to_py_object(py); | 113 let dmap: DirstateMap = dmap.to_py_object(py); |
117 let mut dmap = dmap.get_inner_mut(py); | 114 let mut dmap = dmap.get_inner_mut(py); |
133 &matcher, | 130 &matcher, |
134 root_dir.to_path_buf(), | 131 root_dir.to_path_buf(), |
135 ignore_files, | 132 ignore_files, |
136 StatusOptions { | 133 StatusOptions { |
137 check_exec, | 134 check_exec, |
138 last_normal_time, | |
139 list_clean, | 135 list_clean, |
140 list_ignored, | 136 list_ignored, |
141 list_unknown, | 137 list_unknown, |
142 collect_traversed_dirs, | 138 collect_traversed_dirs, |
143 }, | 139 }, |
170 &matcher, | 166 &matcher, |
171 root_dir.to_path_buf(), | 167 root_dir.to_path_buf(), |
172 ignore_files, | 168 ignore_files, |
173 StatusOptions { | 169 StatusOptions { |
174 check_exec, | 170 check_exec, |
175 last_normal_time, | |
176 list_clean, | 171 list_clean, |
177 list_ignored, | 172 list_ignored, |
178 list_unknown, | 173 list_unknown, |
179 collect_traversed_dirs, | 174 collect_traversed_dirs, |
180 }, | 175 }, |
222 &matcher, | 217 &matcher, |
223 root_dir.to_path_buf(), | 218 root_dir.to_path_buf(), |
224 ignore_files, | 219 ignore_files, |
225 StatusOptions { | 220 StatusOptions { |
226 check_exec, | 221 check_exec, |
227 last_normal_time, | |
228 list_clean, | 222 list_clean, |
229 list_ignored, | 223 list_ignored, |
230 list_unknown, | 224 list_unknown, |
231 collect_traversed_dirs, | 225 collect_traversed_dirs, |
232 }, | 226 }, |