D11510: dirstate: drop unused condition in `from_p2`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Wed Sep 29 08:36:34 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This conditional was added (by me) tentatively because "it seemed more
  correct", but it is not used anywhere yet, and it is missing from the C and the
  Rust implementation. So it seems more consistent to drop it for now.
  
  This effectively backout f94cc63df859c <https://phab.mercurial-scm.org/rHGf94cc63df859c27851c2711aeaaad39b9e00daf0>

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11510

AFFECTED FILES
  mercurial/pure/parsers.py

CHANGE DETAILS

diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py
+++ b/mercurial/pure/parsers.py
@@ -336,7 +336,7 @@
         """
         if not self._wc_tracked:
             return False
-        return self._clean_p2 or (not self._p1_tracked and self._p2_tracked)
+        return self._clean_p2
 
     @property
     def from_p2_removed(self):



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list