Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
47350:04d1f17f49e7 | 47351:3b9914b28133 |
---|---|
141 &self, | 141 &self, |
142 key: &HgPath, | 142 key: &HgPath, |
143 ) -> Result<Option<DirstateEntry>, DirstateV2ParseError>; | 143 ) -> Result<Option<DirstateEntry>, DirstateV2ParseError>; |
144 | 144 |
145 fn iter(&self) -> StateMapIter<'_>; | 145 fn iter(&self) -> StateMapIter<'_>; |
146 | |
147 fn iter_directories( | |
148 &self, | |
149 ) -> Box< | |
150 dyn Iterator< | |
151 Item = Result< | |
152 (&HgPath, Option<Timestamp>), | |
153 DirstateV2ParseError, | |
154 >, | |
155 > + Send | |
156 + '_, | |
157 >; | |
146 } | 158 } |
147 | 159 |
148 impl DirstateMapMethods for DirstateMap { | 160 impl DirstateMapMethods for DirstateMap { |
149 fn clear(&mut self) { | 161 fn clear(&mut self) { |
150 self.clear() | 162 self.clear() |
348 } | 360 } |
349 | 361 |
350 fn iter(&self) -> StateMapIter<'_> { | 362 fn iter(&self) -> StateMapIter<'_> { |
351 Box::new((&**self).iter().map(|(key, value)| Ok((&**key, *value)))) | 363 Box::new((&**self).iter().map(|(key, value)| Ok((&**key, *value)))) |
352 } | 364 } |
365 | |
366 fn iter_directories( | |
367 &self, | |
368 ) -> Box< | |
369 dyn Iterator< | |
370 Item = Result< | |
371 (&HgPath, Option<Timestamp>), | |
372 DirstateV2ParseError, | |
373 >, | |
374 > + Send | |
375 + '_, | |
376 > { | |
377 Box::new(std::iter::empty()) | |
378 } | |
353 } | 379 } |