--- a/rust/hg-cpython/src/dirstate/item.rs Tue Nov 23 19:27:17 2021 +0100
+++ b/rust/hg-cpython/src/dirstate/item.rs Wed Nov 24 04:40:00 2021 +0100
@@ -23,7 +23,7 @@
p2_info: bool = false,
has_meaningful_data: bool = true,
has_meaningful_mtime: bool = true,
- parentfiledata: Option<(u32, u32, Option<(u32, u32)>)> = None,
+ parentfiledata: Option<(u32, u32, Option<(u32, u32, bool)>)> = None,
fallback_exec: Option<bool> = None,
fallback_symlink: Option<bool> = None,
@@ -194,7 +194,8 @@
Ok(mtime)
}
- def mtime_likely_equal_to(&self, other: (u32, u32)) -> PyResult<bool> {
+ def mtime_likely_equal_to(&self, other: (u32, u32, bool))
+ -> PyResult<bool> {
if let Some(mtime) = self.entry(py).get().truncated_mtime() {
Ok(mtime.likely_equal(timestamp(py, other)?))
} else {
@@ -227,7 +228,7 @@
&self,
mode: u32,
size: u32,
- mtime: (u32, u32),
+ mtime: (u32, u32, bool),
) -> PyResult<PyNone> {
let mtime = timestamp(py, mtime)?;
self.update(py, |entry| entry.set_clean(mode, size, mtime));
@@ -272,12 +273,13 @@
pub(crate) fn timestamp(
py: Python<'_>,
- (s, ns): (u32, u32),
+ (s, ns, second_ambiguous): (u32, u32, bool),
) -> PyResult<TruncatedTimestamp> {
- TruncatedTimestamp::from_already_truncated(s, ns).map_err(|_| {
- PyErr::new::<exc::ValueError, _>(
- py,
- "expected mtime truncated to 31 bits",
- )
- })
+ TruncatedTimestamp::from_already_truncated(s, ns, second_ambiguous)
+ .map_err(|_| {
+ PyErr::new::<exc::ValueError, _>(
+ py,
+ "expected mtime truncated to 31 bits",
+ )
+ })
}