Patchwork D11510: dirstate: drop unused condition in `from_p2`

login
register
mail settings
Submitter phabricator
Date Sept. 29, 2021, 8:36 a.m.
Message ID <differential-rev-PHID-DREV-tr7idpeawxdrvqcpe6li-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49834/
State Superseded
Headers show

Comments

phabricator - Sept. 29, 2021, 8:36 a.m.
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




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

Patch

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):