comparison rust/hg-cpython/src/dirstate/dispatch.rs @ 47511:eaae39894312

dirstate: move most of the `remove` logic with dirstatemap `removefile` This code deal with special logic to preserving "merged" and "from_p2" information when removing a file. These are implementation details that are more suitable for the dirstatemap layer. Since the dirstatemap layer alreaday have most of the information necessary to do so, the move is easy. This move helps us to encapsulate more implementation details within the dirstatemap and its entry. Easing the use of a different storage for dirstate v2. Differential Revision: https://phab.mercurial-scm.org/D10953
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 03 Jul 2021 19:52:00 +0200
parents eb416759af7e
children abed645b8e96
comparison
equal deleted inserted replaced
47510:94c58f3aab56 47511:eaae39894312
31 } 31 }
32 32
33 fn remove_file( 33 fn remove_file(
34 &mut self, 34 &mut self,
35 filename: &HgPath, 35 filename: &HgPath,
36 old_state: EntryState, 36 in_merge: bool,
37 size: i32,
38 ) -> Result<(), DirstateError> { 37 ) -> Result<(), DirstateError> {
39 self.get_mut().remove_file(filename, old_state, size) 38 self.get_mut().remove_file(filename, in_merge)
40 } 39 }
41 40
42 fn drop_file( 41 fn drop_file(
43 &mut self, 42 &mut self,
44 filename: &HgPath, 43 filename: &HgPath,