rust/hg-core/src/dirstate_tree/dispatch.rs
changeset 47535 6025353c9c55
parent 47527 c6b91a9c242a
child 47674 ff97e793ed36
equal deleted inserted replaced
47534:e53a42dce923 47535:6025353c9c55
     8 use crate::DirstateEntry;
     8 use crate::DirstateEntry;
     9 use crate::DirstateError;
     9 use crate::DirstateError;
    10 use crate::DirstateMap;
    10 use crate::DirstateMap;
    11 use crate::DirstateParents;
    11 use crate::DirstateParents;
    12 use crate::DirstateStatus;
    12 use crate::DirstateStatus;
    13 use crate::EntryState;
       
    14 use crate::PatternFileWarning;
    13 use crate::PatternFileWarning;
    15 use crate::StateMapIter;
    14 use crate::StateMapIter;
    16 use crate::StatusError;
    15 use crate::StatusError;
    17 use crate::StatusOptions;
    16 use crate::StatusOptions;
    18 
    17 
    72     ///
    71     ///
    73     /// `get` will now return `None` for this filename.
    72     /// `get` will now return `None` for this filename.
    74     ///
    73     ///
    75     /// `old_state` is the state in the entry that `get` would have returned
    74     /// `old_state` is the state in the entry that `get` would have returned
    76     /// before this call, or `EntryState::Unknown` if there was no such entry.
    75     /// before this call, or `EntryState::Unknown` if there was no such entry.
    77     fn drop_file(
    76     fn drop_file(&mut self, filename: &HgPath) -> Result<bool, DirstateError>;
    78         &mut self,
       
    79         filename: &HgPath,
       
    80         old_state: EntryState,
       
    81     ) -> Result<bool, DirstateError>;
       
    82 
    77 
    83     /// Among given files, mark the stored `mtime` as ambiguous if there is one
    78     /// Among given files, mark the stored `mtime` as ambiguous if there is one
    84     /// (if `state == EntryState::Normal`) equal to the given current Unix
    79     /// (if `state == EntryState::Normal`) equal to the given current Unix
    85     /// timestamp.
    80     /// timestamp.
    86     fn clear_ambiguous_times(
    81     fn clear_ambiguous_times(
   303         in_merge: bool,
   298         in_merge: bool,
   304     ) -> Result<(), DirstateError> {
   299     ) -> Result<(), DirstateError> {
   305         self.remove_file(filename, in_merge)
   300         self.remove_file(filename, in_merge)
   306     }
   301     }
   307 
   302 
   308     fn drop_file(
   303     fn drop_file(&mut self, filename: &HgPath) -> Result<bool, DirstateError> {
   309         &mut self,
   304         self.drop_file(filename)
   310         filename: &HgPath,
       
   311         old_state: EntryState,
       
   312     ) -> Result<bool, DirstateError> {
       
   313         self.drop_file(filename, old_state)
       
   314     }
   305     }
   315 
   306 
   316     fn clear_ambiguous_times(
   307     fn clear_ambiguous_times(
   317         &mut self,
   308         &mut self,
   318         filenames: Vec<HgPathBuf>,
   309         filenames: Vec<HgPathBuf>,