comparison rust/hg-cpython/src/dirstate/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
comparison
equal deleted inserted replaced
47534:e53a42dce923 47535:6025353c9c55
7 use hg::CopyMapIter; 7 use hg::CopyMapIter;
8 use hg::DirstateEntry; 8 use hg::DirstateEntry;
9 use hg::DirstateError; 9 use hg::DirstateError;
10 use hg::DirstateParents; 10 use hg::DirstateParents;
11 use hg::DirstateStatus; 11 use hg::DirstateStatus;
12 use hg::EntryState;
13 use hg::PatternFileWarning; 12 use hg::PatternFileWarning;
14 use hg::StateMapIter; 13 use hg::StateMapIter;
15 use hg::StatusError; 14 use hg::StatusError;
16 use hg::StatusOptions; 15 use hg::StatusOptions;
17 use std::path::PathBuf; 16 use std::path::PathBuf;
46 in_merge: bool, 45 in_merge: bool,
47 ) -> Result<(), DirstateError> { 46 ) -> Result<(), DirstateError> {
48 self.get_mut().remove_file(filename, in_merge) 47 self.get_mut().remove_file(filename, in_merge)
49 } 48 }
50 49
51 fn drop_file( 50 fn drop_file(&mut self, filename: &HgPath) -> Result<bool, DirstateError> {
52 &mut self, 51 self.get_mut().drop_file(filename)
53 filename: &HgPath,
54 old_state: EntryState,
55 ) -> Result<bool, DirstateError> {
56 self.get_mut().drop_file(filename, old_state)
57 } 52 }
58 53
59 fn clear_ambiguous_times( 54 fn clear_ambiguous_times(
60 &mut self, 55 &mut self,
61 filenames: Vec<HgPathBuf>, 56 filenames: Vec<HgPathBuf>,