Mercurial > public > mercurial-scm > hg
comparison rust/hg-core/src/dirstate_tree/dispatch.rs @ 48050:2ac0e6b23222
dirstate: Replace dropfile with drop_item_and_copy_source
Those removing a DirstateItem and a copy source are always done together
Differential Revision: https://phab.mercurial-scm.org/D11493
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Thu, 23 Sep 2021 15:36:43 +0200 |
parents | 29aa633815db |
children | 98c0408324e6 |
comparison
equal
deleted
inserted
replaced
48049:29aa633815db | 48050:2ac0e6b23222 |
---|---|
64 ) -> Result<(), DirstateError>; | 64 ) -> Result<(), DirstateError>; |
65 | 65 |
66 /// Drop information about this file from the map if any. | 66 /// Drop information about this file from the map if any. |
67 /// | 67 /// |
68 /// `get` will now return `None` for this filename. | 68 /// `get` will now return `None` for this filename. |
69 fn drop_file(&mut self, filename: &HgPath) -> Result<(), DirstateError>; | 69 fn drop_entry_and_copy_source( |
70 &mut self, | |
71 filename: &HgPath, | |
72 ) -> Result<(), DirstateError>; | |
70 | 73 |
71 /// Among given files, mark the stored `mtime` as ambiguous if there is one | 74 /// Among given files, mark the stored `mtime` as ambiguous if there is one |
72 /// (if `state == EntryState::Normal`) equal to the given current Unix | 75 /// (if `state == EntryState::Normal`) equal to the given current Unix |
73 /// timestamp. | 76 /// timestamp. |
74 fn clear_ambiguous_times( | 77 fn clear_ambiguous_times( |
337 in_merge: bool, | 340 in_merge: bool, |
338 ) -> Result<(), DirstateError> { | 341 ) -> Result<(), DirstateError> { |
339 self.remove_file(filename, in_merge) | 342 self.remove_file(filename, in_merge) |
340 } | 343 } |
341 | 344 |
342 fn drop_file(&mut self, filename: &HgPath) -> Result<(), DirstateError> { | 345 fn drop_entry_and_copy_source( |
343 self.drop_file(filename) | 346 &mut self, |
347 filename: &HgPath, | |
348 ) -> Result<(), DirstateError> { | |
349 self.drop_entry_and_copy_source(filename) | |
344 } | 350 } |
345 | 351 |
346 fn clear_ambiguous_times( | 352 fn clear_ambiguous_times( |
347 &mut self, | 353 &mut self, |
348 filenames: Vec<HgPathBuf>, | 354 filenames: Vec<HgPathBuf>, |