Mercurial > public > mercurial-scm > hg
comparison rust/hg-core/src/dirstate_tree/dispatch.rs @ 48051:98c0408324e6
dirstate: Pass the final DirstateItem to _rustmap.addfile()
Now that the Python DirstateItem class wraps a Rust DirstateEntry value,
use that value directly instead of converting through v1 data + 5 booleans.
Also remove propogating the return value. None of the callers look at it,
and it is always None.
Differential Revision: https://phab.mercurial-scm.org/D11494
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Thu, 23 Sep 2021 18:29:40 +0200 |
parents | 2ac0e6b23222 |
children | cd13d3c2ad2e |
comparison
equal
deleted
inserted
replaced
48050:2ac0e6b23222 | 48051:98c0408324e6 |
---|---|
48 /// Add or change the information associated to a given file. | 48 /// Add or change the information associated to a given file. |
49 fn add_file( | 49 fn add_file( |
50 &mut self, | 50 &mut self, |
51 filename: &HgPath, | 51 filename: &HgPath, |
52 entry: DirstateEntry, | 52 entry: DirstateEntry, |
53 added: bool, | |
54 merged: bool, | |
55 from_p2: bool, | |
56 possibly_dirty: bool, | |
57 ) -> Result<(), DirstateError>; | 53 ) -> Result<(), DirstateError>; |
58 | 54 |
59 /// Mark a file as "removed" (as in `hg rm`). | 55 /// Mark a file as "removed" (as in `hg rm`). |
60 fn remove_file( | 56 fn remove_file( |
61 &mut self, | 57 &mut self, |
324 | 320 |
325 fn add_file( | 321 fn add_file( |
326 &mut self, | 322 &mut self, |
327 filename: &HgPath, | 323 filename: &HgPath, |
328 entry: DirstateEntry, | 324 entry: DirstateEntry, |
329 added: bool, | |
330 merged: bool, | |
331 from_p2: bool, | |
332 possibly_dirty: bool, | |
333 ) -> Result<(), DirstateError> { | 325 ) -> Result<(), DirstateError> { |
334 self.add_file(filename, entry, added, merged, from_p2, possibly_dirty) | 326 self.add_file(filename, entry) |
335 } | 327 } |
336 | 328 |
337 fn remove_file( | 329 fn remove_file( |
338 &mut self, | 330 &mut self, |
339 filename: &HgPath, | 331 filename: &HgPath, |