diff -r e53a42dce923 -r 6025353c9c55 rust/hg-core/src/dirstate_tree/dirstate_map.rs --- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs Sun Jul 04 02:21:59 2021 +0200 +++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs Sun Jul 04 02:28:08 2021 +0200 @@ -803,11 +803,11 @@ Ok(self.add_or_remove_file(filename, old_state, entry)?) } - fn drop_file( - &mut self, - filename: &HgPath, - old_state: EntryState, - ) -> Result { + fn drop_file(&mut self, filename: &HgPath) -> Result { + let old_state = match self.get(filename)? { + Some(e) => e.state, + None => EntryState::Unknown, + }; struct Dropped { was_tracked: bool, had_entry: bool,