diff mercurial/pure/parsers.py @ 47686:e43128ee436f

dirstate-item: introduce a `dm_otherparent` property See inline documentation for details. Differential Revision: https://phab.mercurial-scm.org/D11124
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 14 Jul 2021 22:06:13 +0200
parents 265cdfaad372
children 3853e6ee160d
line wrap: on
line diff
--- a/mercurial/pure/parsers.py	Wed Jul 14 21:59:18 2021 +0200
+++ b/mercurial/pure/parsers.py	Wed Jul 14 22:06:13 2021 +0200
@@ -195,6 +195,14 @@
         """
         return self.state != b'n' or self.mtime == AMBIGUOUS_TIME
 
+    @property
+    def dm_otherparent(self):
+        """True is the entry is `otherparent` in the dirstatemap sense
+
+        There is no reason for any code, but the dirstatemap one to use this.
+        """
+        return self._size == FROM_P2
+
     def v1_state(self):
         """return a "state" suitable for v1 serialization"""
         return self._state