equal
deleted
inserted
replaced
239 let dirstate = self.hg_vfs().mmap_open("dirstate")?; |
239 let dirstate = self.hg_vfs().mmap_open("dirstate")?; |
240 if dirstate.is_empty() { |
240 if dirstate.is_empty() { |
241 return Ok(crate::dirstate::DirstateParents::NULL); |
241 return Ok(crate::dirstate::DirstateParents::NULL); |
242 } |
242 } |
243 let parents = if self.has_dirstate_v2() { |
243 let parents = if self.has_dirstate_v2() { |
244 crate::dirstate_tree::on_disk::parse_dirstate_parents(&dirstate)? |
244 crate::dirstate_tree::on_disk::read_docket(&dirstate)?.parents() |
245 } else { |
245 } else { |
246 crate::dirstate::parsers::parse_dirstate_parents(&dirstate)? |
246 crate::dirstate::parsers::parse_dirstate_parents(&dirstate)? |
|
247 .clone() |
247 }; |
248 }; |
248 Ok(parents.clone()) |
249 Ok(parents) |
249 } |
250 } |
250 } |
251 } |
251 |
252 |
252 impl Vfs<'_> { |
253 impl Vfs<'_> { |
253 pub fn join(&self, relative_path: impl AsRef<Path>) -> PathBuf { |
254 pub fn join(&self, relative_path: impl AsRef<Path>) -> PathBuf { |