dirstate-item: replace another usage of `merged`
We simply spell out the logic here. This was the last usage of `merged`.
Differential Revision: https://phab.mercurial-scm.org/D11596
--- a/mercurial/pure/parsers.py Fri Oct 01 03:28:01 2021 +0200
+++ b/mercurial/pure/parsers.py Fri Oct 01 03:29:33 2021 +0200
@@ -334,7 +334,7 @@
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'
--- a/rust/hg-core/src/dirstate/entry.rs Fri Oct 01 03:28:01 2021 +0200
+++ b/rust/hg-core/src/dirstate/entry.rs Fri Oct 01 03:29:33 2021 +0200
@@ -219,7 +219,10 @@
}
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