diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py
+++ b/mercurial/pure/parsers.py
@@ -334,7 +334,7 @@ class DirstateItem(object):
             raise RuntimeError('untracked item')
         elif self.removed:
             return b'r'
-        elif self.merged:
+        elif self._p1_tracked and self._p2_info:
             return b'm'
         elif self.added:
             return b'a'
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
@@ -219,7 +219,10 @@ impl DirstateEntry {
         }
         if self.removed() {
             EntryState::Removed
-        } else if self.merged() {
+        } else if self
+            .flags
+            .contains(Flags::WDIR_TRACKED | Flags::P1_TRACKED | Flags::P2_INFO)
+        {
             EntryState::Merged
         } else if self.added() {
             EntryState::Added