Show More
@@ -803,6 +803,26 b" impl<'on_disk> DirstateMap<'on_disk> {" | |||
|
803 | 803 | Ok(()) |
|
804 | 804 | } |
|
805 | 805 | |
|
806 | /// Clears the cached mtime for the (potential) folder at `path`. | |
|
807 | pub(super) fn clear_cached_mtime( | |
|
808 | &mut self, | |
|
809 | path: &HgPath, | |
|
810 | ) -> Result<(), DirstateV2ParseError> { | |
|
811 | let node = match DirstateMap::get_node_mut( | |
|
812 | self.on_disk, | |
|
813 | &mut self.unreachable_bytes, | |
|
814 | &mut self.root, | |
|
815 | path, | |
|
816 | )? { | |
|
817 | Some(node) => node, | |
|
818 | None => return Ok(()), | |
|
819 | }; | |
|
820 | if let NodeData::CachedDirectory { .. } = &node.data { | |
|
821 | node.data = NodeData::None | |
|
822 | } | |
|
823 | Ok(()) | |
|
824 | } | |
|
825 | ||
|
806 | 826 | fn iter_nodes<'tree>( |
|
807 | 827 | &'tree self, |
|
808 | 828 | ) -> impl Iterator< |
@@ -140,10 +140,7 b" pub fn status<'dirstate>(" | |||
|
140 | 140 | // Remove outdated mtimes before adding new mtimes, in case a given |
|
141 | 141 | // directory is both |
|
142 | 142 | for path in &outdated { |
|
143 |
|
|
|
144 | if let NodeData::CachedDirectory { .. } = &node.data { | |
|
145 | node.data = NodeData::None | |
|
146 | } | |
|
143 | dmap.clear_cached_mtime(path)?; | |
|
147 | 144 | } |
|
148 | 145 | for (path, mtime) in &new_cachable { |
|
149 | 146 | let node = dmap.get_or_insert(path)?; |
General Comments 0
You need to be logged in to leave comments.
Login now