dirstate-item: add more logic to `from_p2`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 27 Aug 2021 18:04:49 +0200
changeset 47935 97e9f3fd9324
parent 47934 f94cc63df859
child 47936 0d185f73c619
dirstate-item: add more logic to `from_p2` This seem semantically better even if this tracking case seems to always comes with clean_p2 for now. Differential Revision: https://phab.mercurial-scm.org/D11372
mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py	Fri Aug 27 17:14:54 2021 +0200
+++ b/mercurial/pure/parsers.py	Fri Aug 27 18:04:49 2021 +0200
@@ -286,7 +286,9 @@
 
         Should only be set if a merge is in progress in the dirstate
         """
-        return self._wc_tracked and self._clean_p2
+        if not self._wc_tracked:
+            return False
+        return self._clean_p2 or (not self._p1_tracked and self._p2_tracked)
 
     @property
     def from_p2_removed(self):