rust/hg-core/src/dirstate/dirstate_map.rs
changeset 47692 e5fb14a07866
parent 47535 6025353c9c55
child 47944 e02f9af7aed1
equal deleted inserted replaced
47691:33beeb32f73a 47692:e5fb14a07866
    60     pub fn clear(&mut self) {
    60     pub fn clear(&mut self) {
    61         self.state_map = StateMap::default();
    61         self.state_map = StateMap::default();
    62         self.copy_map.clear();
    62         self.copy_map.clear();
    63         self.non_normal_set = None;
    63         self.non_normal_set = None;
    64         self.other_parent_set = None;
    64         self.other_parent_set = None;
       
    65     }
       
    66 
       
    67     pub fn set_v1_inner(&mut self, filename: &HgPath, entry: DirstateEntry) {
       
    68         self.state_map.insert(filename.to_owned(), entry);
    65     }
    69     }
    66 
    70 
    67     /// Add a tracked file to the dirstate
    71     /// Add a tracked file to the dirstate
    68     pub fn add_file(
    72     pub fn add_file(
    69         &mut self,
    73         &mut self,
   243                 }
   247                 }
   244             }
   248             }
   245         }
   249         }
   246     }
   250     }
   247 
   251 
   248     pub fn non_normal_entries_remove(&mut self, key: impl AsRef<HgPath>) {
   252     pub fn non_normal_entries_remove(
       
   253         &mut self,
       
   254         key: impl AsRef<HgPath>,
       
   255     ) -> bool {
   249         self.get_non_normal_other_parent_entries()
   256         self.get_non_normal_other_parent_entries()
   250             .0
   257             .0
   251             .remove(key.as_ref());
   258             .remove(key.as_ref())
       
   259     }
       
   260 
       
   261     pub fn non_normal_entries_add(&mut self, key: impl AsRef<HgPath>) {
       
   262         self.get_non_normal_other_parent_entries()
       
   263             .0
       
   264             .insert(key.as_ref().into());
   252     }
   265     }
   253 
   266 
   254     pub fn non_normal_entries_union(
   267     pub fn non_normal_entries_union(
   255         &mut self,
   268         &mut self,
   256         other: HashSet<HgPathBuf>,
   269         other: HashSet<HgPathBuf>,