Mercurial > hg
diff rust/hg-core/src/dirstate_tree/dirstate_map.rs @ 47527:c6b91a9c242a
dirstate: use a `merged` parameter to _addpath
Differential Revision: https://phab.mercurial-scm.org/D10969
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 04 Jul 2021 01:48:11 +0200 |
parents | fe4641cf9b72 |
children | 80617f3c0f9a |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs Sun Jul 04 01:44:43 2021 +0200 +++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs Sun Jul 04 01:48:11 2021 +0200 @@ -723,6 +723,7 @@ filename: &HgPath, entry: DirstateEntry, added: bool, + merged: bool, from_p2: bool, possibly_dirty: bool, ) -> Result<(), DirstateError> { @@ -733,6 +734,12 @@ entry.state = EntryState::Added; entry.size = SIZE_NON_NORMAL; entry.mtime = MTIME_UNSET; + } else if merged { + assert!(!possibly_dirty); + assert!(!from_p2); + entry.state = EntryState::Merged; + entry.size = SIZE_FROM_OTHER_PARENT; + entry.mtime = MTIME_UNSET; } else if from_p2 { assert!(!possibly_dirty); entry.size = SIZE_FROM_OTHER_PARENT;