Mercurial > public > mercurial-scm > hg
diff 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 |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate.rs Thu Nov 07 10:32:26 2019 +0100 +++ b/rust/hg-core/src/dirstate.rs Thu Nov 07 11:13:31 2019 +0100 @@ -32,6 +32,11 @@ pub size: i32, } +/// A `DirstateEntry` with a size of `-2` means that it was merged from the +/// other parent. This allows revert to pick the right status back during a +/// merge. +pub const SIZE_FROM_OTHER_PARENT: i32 = -2; + pub type StateMap = HashMap<HgPathBuf, DirstateEntry>; pub type StateMapIter<'a> = hash_map::Iter<'a, HgPathBuf, DirstateEntry>; pub type CopyMap = HashMap<HgPathBuf, HgPathBuf>;