Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/dirstate_tree/dispatch.rs @ 48023:357307feaf61
debugstate: Always call dirstatemap.debug_iter()
? passing it a new `all` argument for the `--all` CLI option,
instead of conditionally calling `.debug_iter()` or `.items()`
This prepares for the next commit.
Differential Revision: https://phab.mercurial-scm.org/D11462
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 20 Sep 2021 19:59:09 +0200 |
parents | e5fb14a07866 |
children | 32ef647821b2 |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/dispatch.rs Fri Sep 17 13:33:45 2021 +0200 +++ b/rust/hg-core/src/dirstate_tree/dispatch.rs Mon Sep 20 19:59:09 2021 +0200 @@ -290,13 +290,15 @@ /// node stored in this dirstate map, for the purpose of the `hg /// debugdirstate` command. /// - /// For nodes that don’t have an entry, `state` is the ASCII space. + /// If `all` is true, include nodes that don’t have an entry. + /// For such nodes `state` is the ASCII space. /// An `mtime` may still be present. It is used to optimize `status`. /// /// Because parse errors can happen during iteration, the iterated items /// are `Result`s. fn debug_iter( &self, + all: bool, ) -> Box< dyn Iterator< Item = Result< @@ -538,6 +540,7 @@ fn debug_iter( &self, + all: bool, ) -> Box< dyn Iterator< Item = Result< @@ -547,6 +550,9 @@ > + Send + '_, > { + // Not used for the flat (not tree-based) DirstateMap + let _ = all; + Box::new( (&**self) .iter()