rust/hg-core/src/repo.rs
changeset 47674 ff97e793ed36
parent 47413 6e49769b7f97
child 47779 cf5f8da2244c
equal deleted inserted replaced
47673:37825a85d3b0 47674:ff97e793ed36
   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 {