Mercurial > public > mercurial-scm > hg-stable
diff rust/hg-core/src/dirstate_tree/dispatch.rs @ 47535:6025353c9c55
dirstate: no longer pass `oldstate` to the `dropfile`
The `oldstate` value come literally from `_map` so we don't need to pass tha
information along.
Differential Revision: https://phab.mercurial-scm.org/D10978
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 04 Jul 2021 02:28:08 +0200 |
parents | c6b91a9c242a |
children | ff97e793ed36 |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/dispatch.rs Sun Jul 04 02:21:59 2021 +0200 +++ b/rust/hg-core/src/dirstate_tree/dispatch.rs Sun Jul 04 02:28:08 2021 +0200 @@ -10,7 +10,6 @@ use crate::DirstateMap; use crate::DirstateParents; use crate::DirstateStatus; -use crate::EntryState; use crate::PatternFileWarning; use crate::StateMapIter; use crate::StatusError; @@ -74,11 +73,7 @@ /// /// `old_state` is the state in the entry that `get` would have returned /// before this call, or `EntryState::Unknown` if there was no such entry. - fn drop_file( - &mut self, - filename: &HgPath, - old_state: EntryState, - ) -> Result<bool, DirstateError>; + fn drop_file(&mut self, filename: &HgPath) -> Result<bool, DirstateError>; /// Among given files, mark the stored `mtime` as ambiguous if there is one /// (if `state == EntryState::Normal`) equal to the given current Unix @@ -305,12 +300,8 @@ self.remove_file(filename, in_merge) } - fn drop_file( - &mut self, - filename: &HgPath, - old_state: EntryState, - ) -> Result<bool, DirstateError> { - self.drop_file(filename, old_state) + fn drop_file(&mut self, filename: &HgPath) -> Result<bool, DirstateError> { + self.drop_file(filename) } fn clear_ambiguous_times(