comparison rust/hg-core/src/dirstate_tree/dispatch.rs @ 47477:eb416759af7e

dirstate: Removed unused instances of `DirsMultiset` ? in Rust-backed dirstatemap. The Python class `dirstatemap` had cached properties `_dirs` and `_alldirs` that were not used for `hastrackeddir` and `hasdir` since they were redundant with corresponding fields for the Rust `DirstateMap` struct. `dirfoldmap` is modified to reuse instead the directory iterator introduced in 3b9914b28133c0918186b6e8b9e4f1916e21338d. Differential Revision: https://phab.mercurial-scm.org/D10921
author Simon Sapin <simon.sapin@octobus.net>
date Mon, 28 Jun 2021 15:52:10 +0200
parents 3b9914b28133
children 8851acad5906
comparison
equal deleted inserted replaced
47476:f23eafb036af 47477:eb416759af7e
93 &mut self, 93 &mut self,
94 parents: DirstateParents, 94 parents: DirstateParents,
95 now: Timestamp, 95 now: Timestamp,
96 ) -> Result<Vec<u8>, DirstateError>; 96 ) -> Result<Vec<u8>, DirstateError>;
97 97
98 fn set_all_dirs(&mut self) -> Result<(), DirstateError>;
99
100 fn set_dirs(&mut self) -> Result<(), DirstateError>;
101
102 fn status<'a>( 98 fn status<'a>(
103 &'a mut self, 99 &'a mut self,
104 matcher: &'a (dyn Matcher + Sync), 100 matcher: &'a (dyn Matcher + Sync),
105 root_dir: PathBuf, 101 root_dir: PathBuf,
106 ignore_files: Vec<PathBuf>, 102 ignore_files: Vec<PathBuf>,
279 panic!( 275 panic!(
280 "should have used dirstate_tree::DirstateMap to use the v2 format" 276 "should have used dirstate_tree::DirstateMap to use the v2 format"
281 ) 277 )
282 } 278 }
283 279
284 fn set_all_dirs(&mut self) -> Result<(), DirstateError> {
285 self.set_all_dirs()
286 }
287
288 fn set_dirs(&mut self) -> Result<(), DirstateError> {
289 self.set_dirs()
290 }
291
292 fn status<'a>( 280 fn status<'a>(
293 &'a mut self, 281 &'a mut self,
294 matcher: &'a (dyn Matcher + Sync), 282 matcher: &'a (dyn Matcher + Sync),
295 root_dir: PathBuf, 283 root_dir: PathBuf,
296 ignore_files: Vec<PathBuf>, 284 ignore_files: Vec<PathBuf>,