diff rust/hg-core/src/dirstate_tree/dispatch.rs @ 47351:3b9914b28133

dirstate-v2: Add --dirs to debugdirstate command `hg debugdirstate --dirs` also shows information stored in the dirstate (for `read_dir` caching) about directories. Differential Revision: https://phab.mercurial-scm.org/D10828
author Simon Sapin <simon.sapin@octobus.net>
date Mon, 31 May 2021 19:54:41 +0200
parents ed1583a845d2
children eb416759af7e
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/dispatch.rs	Mon May 31 18:35:44 2021 +0200
+++ b/rust/hg-core/src/dirstate_tree/dispatch.rs	Mon May 31 19:54:41 2021 +0200
@@ -143,6 +143,18 @@
     ) -> Result<Option<DirstateEntry>, DirstateV2ParseError>;
 
     fn iter(&self) -> StateMapIter<'_>;
+
+    fn iter_directories(
+        &self,
+    ) -> Box<
+        dyn Iterator<
+                Item = Result<
+                    (&HgPath, Option<Timestamp>),
+                    DirstateV2ParseError,
+                >,
+            > + Send
+            + '_,
+    >;
 }
 
 impl DirstateMapMethods for DirstateMap {
@@ -350,4 +362,18 @@
     fn iter(&self) -> StateMapIter<'_> {
         Box::new((&**self).iter().map(|(key, value)| Ok((&**key, *value))))
     }
+
+    fn iter_directories(
+        &self,
+    ) -> Box<
+        dyn Iterator<
+                Item = Result<
+                    (&HgPath, Option<Timestamp>),
+                    DirstateV2ParseError,
+                >,
+            > + Send
+            + '_,
+    > {
+        Box::new(std::iter::empty())
+    }
 }