Show More
@@ -121,8 +121,8 b" pub fn status<'dirstate>(" | |||
|
121 | 121 | ignore_fn, |
|
122 | 122 | outcome: Mutex::new(outcome), |
|
123 | 123 | ignore_patterns_have_changed: patterns_changed, |
|
124 | new_cachable_directories: Default::default(), | |
|
125 | outated_cached_directories: Default::default(), | |
|
124 | new_cacheable_directories: Default::default(), | |
|
125 | outdated_cached_directories: Default::default(), | |
|
126 | 126 | filesystem_time_at_status_start, |
|
127 | 127 | }; |
|
128 | 128 | let is_at_repo_root = true; |
@@ -143,12 +143,12 b" pub fn status<'dirstate>(" | |||
|
143 | 143 | is_at_repo_root, |
|
144 | 144 | )?; |
|
145 | 145 | let mut outcome = common.outcome.into_inner().unwrap(); |
|
146 | let new_cachable = common.new_cachable_directories.into_inner().unwrap(); | |
|
147 | let outdated = common.outated_cached_directories.into_inner().unwrap(); | |
|
146 | let new_cacheable = common.new_cacheable_directories.into_inner().unwrap(); | |
|
147 | let outdated = common.outdated_cached_directories.into_inner().unwrap(); | |
|
148 | 148 | |
|
149 | 149 | outcome.dirty = common.ignore_patterns_have_changed == Some(true) |
|
150 | 150 | || !outdated.is_empty() |
|
151 | || (!new_cachable.is_empty() | |
|
151 | || (!new_cacheable.is_empty() | |
|
152 | 152 | && dmap.dirstate_version == DirstateVersion::V2); |
|
153 | 153 | |
|
154 | 154 | // Remove outdated mtimes before adding new mtimes, in case a given |
@@ -156,7 +156,7 b" pub fn status<'dirstate>(" | |||
|
156 | 156 | for path in &outdated { |
|
157 | 157 | dmap.clear_cached_mtime(path)?; |
|
158 | 158 | } |
|
159 | for (path, mtime) in &new_cachable { | |
|
159 | for (path, mtime) in &new_cacheable { | |
|
160 | 160 | dmap.set_cached_mtime(path, *mtime)?; |
|
161 | 161 | } |
|
162 | 162 | |
@@ -171,9 +171,11 b" struct StatusCommon<'a, 'tree, 'on_disk:" | |||
|
171 | 171 | matcher: &'a (dyn Matcher + Sync), |
|
172 | 172 | ignore_fn: IgnoreFnType<'a>, |
|
173 | 173 | outcome: Mutex<DirstateStatus<'on_disk>>, |
|
174 | new_cachable_directories: | |
|
174 | /// New timestamps of directories to be used for caching their readdirs | |
|
175 | new_cacheable_directories: | |
|
175 | 176 | Mutex<Vec<(Cow<'on_disk, HgPath>, TruncatedTimestamp)>>, |
|
176 | outated_cached_directories: Mutex<Vec<Cow<'on_disk, HgPath>>>, | |
|
177 | /// Used to invalidate the readdir cache of directories | |
|
178 | outdated_cached_directories: Mutex<Vec<Cow<'on_disk, HgPath>>>, | |
|
177 | 179 | |
|
178 | 180 | /// Whether ignore files like `.hgignore` have changed since the previous |
|
179 | 181 | /// time a `status()` call wrote their hash to the dirstate. `None` means |
@@ -305,7 +307,7 b" impl<'a, 'tree, 'on_disk> StatusCommon<'" | |||
|
305 | 307 | if self.ignore_patterns_have_changed == Some(true) |
|
306 | 308 | && dirstate_node.cached_directory_mtime()?.is_some() |
|
307 | 309 | { |
|
308 | self.outated_cached_directories.lock().unwrap().push( | |
|
310 | self.outdated_cached_directories.lock().unwrap().push( | |
|
309 | 311 | dirstate_node |
|
310 | 312 | .full_path_borrowed(self.dmap.on_disk)? |
|
311 | 313 | .detach_from_tree(), |
@@ -629,7 +631,7 b" impl<'a, 'tree, 'on_disk> StatusCommon<'" | |||
|
629 | 631 | let hg_path = dirstate_node |
|
630 | 632 | .full_path_borrowed(self.dmap.on_disk)? |
|
631 | 633 | .detach_from_tree(); |
|
632 | self.new_cachable_directories | |
|
634 | self.new_cacheable_directories | |
|
633 | 635 | .lock() |
|
634 | 636 | .unwrap() |
|
635 | 637 | .push((hg_path, directory_mtime)) |
General Comments 0
You need to be logged in to leave comments.
Login now