diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c --- a/mercurial/cext/parsers.c +++ b/mercurial/cext/parsers.c @@ -210,7 +210,8 @@ static inline int dirstate_item_c_v1_size(dirstateItemObject *self) { - if (dirstate_item_c_merged_removed(self)) { + if (dirstate_item_c_removed(self) && + (self->flags & dirstate_flag_merged)) { return dirstate_v1_nonnormal; } else if (dirstate_item_c_from_p2_removed(self)) { return dirstate_v1_from_p2; diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py +++ b/mercurial/pure/parsers.py @@ -386,7 +386,7 @@ # the object has no state to record, this is -currently- # unsupported raise RuntimeError('untracked item') - elif self.merged_removed: + elif self.removed and self._merged: return NONNORMAL elif self.from_p2_removed: return FROM_P2 diff --git a/rust/hg-core/src/dirstate/entry.rs b/rust/hg-core/src/dirstate/entry.rs --- a/rust/hg-core/src/dirstate/entry.rs +++ b/rust/hg-core/src/dirstate/entry.rs @@ -216,7 +216,7 @@ } pub fn size(&self) -> i32 { - if self.merged_removed() { + if self.removed() && self.flags.contains(Flags::MERGED) { SIZE_NON_NORMAL } else if self.from_p2_removed() { SIZE_FROM_OTHER_PARENT