comparison rust/hg-core/src/dirstate.rs @ 43605:8210c3f46912

rust: introduce SIZE_FROM_OTHER_PARENT constant This will clarify what `-2` meant in the codebase. This change also merged imports in affected files for cleanup. Differential Revision: https://phab.mercurial-scm.org/D7301
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 07 Nov 2019 11:13:31 +0100
parents 99394e6c5d12
children 5ac243a92e37
comparison
equal deleted inserted replaced
43604:51cd86735608 43605:8210c3f46912
29 pub state: EntryState, 29 pub state: EntryState,
30 pub mode: i32, 30 pub mode: i32,
31 pub mtime: i32, 31 pub mtime: i32,
32 pub size: i32, 32 pub size: i32,
33 } 33 }
34
35 /// A `DirstateEntry` with a size of `-2` means that it was merged from the
36 /// other parent. This allows revert to pick the right status back during a
37 /// merge.
38 pub const SIZE_FROM_OTHER_PARENT: i32 = -2;
34 39
35 pub type StateMap = HashMap<HgPathBuf, DirstateEntry>; 40 pub type StateMap = HashMap<HgPathBuf, DirstateEntry>;
36 pub type StateMapIter<'a> = hash_map::Iter<'a, HgPathBuf, DirstateEntry>; 41 pub type StateMapIter<'a> = hash_map::Iter<'a, HgPathBuf, DirstateEntry>;
37 pub type CopyMap = HashMap<HgPathBuf, HgPathBuf>; 42 pub type CopyMap = HashMap<HgPathBuf, HgPathBuf>;
38 pub type CopyMapIter<'a> = hash_map::Iter<'a, HgPathBuf, HgPathBuf>; 43 pub type CopyMapIter<'a> = hash_map::Iter<'a, HgPathBuf, HgPathBuf>;