Show More
@@ -803,6 +803,26 b" impl<'on_disk> DirstateMap<'on_disk> {" | |||||
803 | Ok(()) |
|
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 | fn iter_nodes<'tree>( |
|
826 | fn iter_nodes<'tree>( | |
807 | &'tree self, |
|
827 | &'tree self, | |
808 | ) -> impl Iterator< |
|
828 | ) -> impl Iterator< |
@@ -140,10 +140,7 b" pub fn status<'dirstate>(" | |||||
140 | // Remove outdated mtimes before adding new mtimes, in case a given |
|
140 | // Remove outdated mtimes before adding new mtimes, in case a given | |
141 | // directory is both |
|
141 | // directory is both | |
142 | for path in &outdated { |
|
142 | for path in &outdated { | |
143 |
|
|
143 | dmap.clear_cached_mtime(path)?; | |
144 | if let NodeData::CachedDirectory { .. } = &node.data { |
|
|||
145 | node.data = NodeData::None |
|
|||
146 | } |
|
|||
147 | } |
|
144 | } | |
148 | for (path, mtime) in &new_cachable { |
|
145 | for (path, mtime) in &new_cachable { | |
149 | let node = dmap.get_or_insert(path)?; |
|
146 | let node = dmap.get_or_insert(path)?; |
General Comments 0
You need to be logged in to leave comments.
Login now