diff rust/hg-core/src/dirstate_tree/dispatch.rs @ 48056:cd13d3c2ad2e

dirstate: drop the `clearambiguoustimes` method for the map This is no longer called anywhere. Differential Revision: https://phab.mercurial-scm.org/D11502
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 22 Sep 2021 15:23:03 +0200
parents 98c0408324e6
children 060cd909439f
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/dispatch.rs	Wed Sep 22 14:54:42 2021 +0200
+++ b/rust/hg-core/src/dirstate_tree/dispatch.rs	Wed Sep 22 15:23:03 2021 +0200
@@ -67,15 +67,6 @@
         filename: &HgPath,
     ) -> Result<(), DirstateError>;
 
-    /// Among given files, mark the stored `mtime` as ambiguous if there is one
-    /// (if `state == EntryState::Normal`) equal to the given current Unix
-    /// timestamp.
-    fn clear_ambiguous_times(
-        &mut self,
-        filenames: Vec<HgPathBuf>,
-        now: i32,
-    ) -> Result<(), DirstateV2ParseError>;
-
     /// Return whether the map has an "non-normal" entry for the given
     /// filename. That is, any entry with a `state` other than
     /// `EntryState::Normal` or with an ambiguous `mtime`.
@@ -165,20 +156,18 @@
     /// file with a dirstate entry.
     fn has_dir(&mut self, directory: &HgPath) -> Result<bool, DirstateError>;
 
-    /// Clear mtimes that are ambigous with `now` (similar to
-    /// `clear_ambiguous_times` but for all files in the dirstate map), and
-    /// serialize bytes to write the `.hg/dirstate` file to disk in dirstate-v1
-    /// format.
+    /// Clear mtimes equal to `now` in entries with `state ==
+    /// EntryState::Normal`, and serialize bytes to write the `.hg/dirstate`
+    /// file to disk in dirstate-v1 format.
     fn pack_v1(
         &mut self,
         parents: DirstateParents,
         now: Timestamp,
     ) -> Result<Vec<u8>, DirstateError>;
 
-    /// Clear mtimes that are ambigous with `now` (similar to
-    /// `clear_ambiguous_times` but for all files in the dirstate map), and
-    /// serialize bytes to write a dirstate data file to disk in dirstate-v2
-    /// format.
+    /// Clear mtimes equal to `now` in entries with `state ==
+    /// EntryState::Normal`, and serialize  bytes to write a dirstate data file
+    /// to disk in dirstate-v2 format.
     ///
     /// Returns new data and metadata together with whether that data should be
     /// appended to the existing data file whose content is at
@@ -341,14 +330,6 @@
         self.drop_entry_and_copy_source(filename)
     }
 
-    fn clear_ambiguous_times(
-        &mut self,
-        filenames: Vec<HgPathBuf>,
-        now: i32,
-    ) -> Result<(), DirstateV2ParseError> {
-        Ok(self.clear_ambiguous_times(filenames, now))
-    }
-
     fn non_normal_entries_contains(
         &mut self,
         key: &HgPath,