Let's use the new API
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | rust/hg-core/src/dirstate_tree/status.rs (9 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
b22c939352c8 | cf8b477f2378 | Raphaël Gomès | Tue, Apr 12, 11:34 AM |
Status | Author | Revision | |
---|---|---|---|
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare | ||
Needs Review | Alphare |
/// A node in the dirstate tree has no corresponding *file* on the | /// A node in the dirstate tree has no corresponding *file* on the | ||||
/// filesystem | /// filesystem | ||||
/// | /// | ||||
/// Does nothing on a "directory" node | /// Does nothing on a "directory" node | ||||
fn mark_removed_or_deleted_if_file( | fn mark_removed_or_deleted_if_file( | ||||
&self, | &self, | ||||
dirstate_node: &NodeRef<'tree, 'on_disk>, | dirstate_node: &NodeRef<'tree, 'on_disk>, | ||||
) -> Result<(), DirstateV2ParseError> { | ) -> Result<(), DirstateV2ParseError> { | ||||
if let Some(state) = dirstate_node.state()? { | if let Some(entry) = dirstate_node.entry()? { | ||||
if !entry.any_tracked() { | |||||
// Future-compat for when we start storing ignored and unknown | |||||
// files for caching reasons | |||||
return Ok(()); | |||||
} | |||||
let path = dirstate_node.full_path(self.dmap.on_disk)?; | let path = dirstate_node.full_path(self.dmap.on_disk)?; | ||||
if self.matcher.matches(path) { | if self.matcher.matches(path) { | ||||
if let EntryState::Removed = state { | if entry.removed() { | ||||
self.push_outcome(Outcome::Removed, dirstate_node)? | self.push_outcome(Outcome::Removed, dirstate_node)? | ||||
} else { | } else { | ||||
self.push_outcome(Outcome::Deleted, &dirstate_node)? | self.push_outcome(Outcome::Deleted, &dirstate_node)? | ||||
} | } | ||||
} | } | ||||
} | } | ||||
Ok(()) | Ok(()) | ||||
} | } |