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/dirstate_map.rs (18 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| 763fed648b81 | a35c1e78dec6 | Simon Sapin | Apr 6 2021, 8:29 AM |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Abandoned | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin | ||
| Closed | SimonSapin |
| use std::collections::BTreeMap; | use std::collections::BTreeMap; | ||||
| use std::path::PathBuf; | use std::path::PathBuf; | ||||
| use std::time::Duration; | use std::time::Duration; | ||||
| use super::path_with_basename::WithBasename; | use super::path_with_basename::WithBasename; | ||||
| use crate::dirstate::parsers::parse_dirstate_entries; | use crate::dirstate::parsers::parse_dirstate_entries; | ||||
| use crate::dirstate::parsers::parse_dirstate_parents; | |||||
| use crate::matchers::Matcher; | use crate::matchers::Matcher; | ||||
| use crate::revlog::node::NULL_NODE; | use crate::revlog::node::NULL_NODE; | ||||
| use crate::utils::hg_path::{HgPath, HgPathBuf}; | use crate::utils::hg_path::{HgPath, HgPathBuf}; | ||||
| use crate::CopyMapIter; | use crate::CopyMapIter; | ||||
| use crate::DirstateEntry; | use crate::DirstateEntry; | ||||
| use crate::DirstateError; | use crate::DirstateError; | ||||
| use crate::DirstateMapError; | use crate::DirstateMapError; | ||||
| use crate::DirstateParents; | use crate::DirstateParents; | ||||
| &mut self, | &mut self, | ||||
| _directory: &HgPath, | _directory: &HgPath, | ||||
| ) -> Result<bool, DirstateMapError> { | ) -> Result<bool, DirstateMapError> { | ||||
| todo!() | todo!() | ||||
| } | } | ||||
| fn parents( | fn parents( | ||||
| &mut self, | &mut self, | ||||
| _file_contents: &[u8], | file_contents: &[u8], | ||||
| ) -> Result<&DirstateParents, DirstateError> { | ) -> Result<&DirstateParents, DirstateError> { | ||||
| todo!() | if self.parents.is_none() { | ||||
| let parents = if !file_contents.is_empty() { | |||||
| parse_dirstate_parents(file_contents)?.clone() | |||||
| } else { | |||||
| DirstateParents { | |||||
| p1: NULL_NODE, | |||||
| p2: NULL_NODE, | |||||
| } | |||||
| }; | |||||
| self.parents = Some(parents); | |||||
| } | |||||
| Ok(self.parents.as_ref().unwrap()) | |||||
| } | } | ||||
| fn set_parents(&mut self, parents: &DirstateParents) { | fn set_parents(&mut self, parents: &DirstateParents) { | ||||
| self.parents = Some(parents.clone()); | self.parents = Some(parents.clone()); | ||||
| self.dirty_parents = true; | self.dirty_parents = true; | ||||
| } | } | ||||
| fn read<'a>( | fn read<'a>( | ||||