Show More
@@ -579,6 +579,14 b" impl<'on_disk> DirstateMap<'on_disk> {" | |||||
579 | } |
|
579 | } | |
580 | } |
|
580 | } | |
581 |
|
581 | |||
|
582 | pub fn has_node( | |||
|
583 | &self, | |||
|
584 | path: &HgPath, | |||
|
585 | ) -> Result<bool, DirstateV2ParseError> { | |||
|
586 | let node = self.get_node(path)?; | |||
|
587 | Ok(node.is_some()) | |||
|
588 | } | |||
|
589 | ||||
582 | /// Returns a mutable reference to the node at `path` if it exists |
|
590 | /// Returns a mutable reference to the node at `path` if it exists | |
583 | /// |
|
591 | /// | |
584 | /// `each_ancestor` is a callback that is called for each ancestor node |
|
592 | /// `each_ancestor` is a callback that is called for each ancestor node |
@@ -12,6 +12,7 b' use crate::matchers::Matcher;' | |||||
12 | use crate::utils::files::get_bytes_from_os_string; |
|
12 | use crate::utils::files::get_bytes_from_os_string; | |
13 | use crate::utils::files::get_bytes_from_path; |
|
13 | use crate::utils::files::get_bytes_from_path; | |
14 | use crate::utils::files::get_path_from_bytes; |
|
14 | use crate::utils::files::get_path_from_bytes; | |
|
15 | use crate::utils::hg_path::hg_path_to_path_buf; | |||
15 | use crate::utils::hg_path::HgPath; |
|
16 | use crate::utils::hg_path::HgPath; | |
16 | use crate::BadMatch; |
|
17 | use crate::BadMatch; | |
17 | use crate::BadType; |
|
18 | use crate::BadType; | |
@@ -157,6 +158,18 b" pub fn status<'dirstate>(" | |||||
157 | root_cached_mtime, |
|
158 | root_cached_mtime, | |
158 | is_at_repo_root, |
|
159 | is_at_repo_root, | |
159 | )?; |
|
160 | )?; | |
|
161 | if let Some(file_set) = common.matcher.file_set() { | |||
|
162 | for file in file_set { | |||
|
163 | if !file.is_empty() && !dmap.has_node(file)? { | |||
|
164 | let path = hg_path_to_path_buf(file)?; | |||
|
165 | if let io::Result::Err(error) = | |||
|
166 | root_dir.join(path).symlink_metadata() | |||
|
167 | { | |||
|
168 | common.io_error(error, file) | |||
|
169 | } | |||
|
170 | } | |||
|
171 | } | |||
|
172 | } | |||
160 | let mut outcome = common.outcome.into_inner().unwrap(); |
|
173 | let mut outcome = common.outcome.into_inner().unwrap(); | |
161 | let new_cacheable = common.new_cacheable_directories.into_inner().unwrap(); |
|
174 | let new_cacheable = common.new_cacheable_directories.into_inner().unwrap(); | |
162 | let outdated = common.outdated_cached_directories.into_inner().unwrap(); |
|
175 | let outdated = common.outdated_cached_directories.into_inner().unwrap(); |
General Comments 0
You need to be logged in to leave comments.
Login now