Patchwork D11555: dirstate-item: point out that `merged` is set only with p1_tracked

login
register
mail settings
Submitter phabricator
Date Oct. 1, 2021, 6:40 p.m.
Message ID <differential-rev-PHID-DREV-pdvooqyyuxwphvlpvzvn-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49879/
State Superseded
Headers show

Comments

phabricator - Oct. 1, 2021, 6:40 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is currently True, and we will use this fact to simplify the API in the
  next commit.  However, we add this assertion first to validate that this is
  True in the whole test-suite.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -102,6 +102,7 @@ 
             msg = b'`merged` argument incompatible with `clean_p1`/`clean_p2`'
             raise error.ProgrammingError(msg)
 
+        assert not (merged and not p1_tracked)
         self._wc_tracked = wc_tracked
         self._p1_tracked = p1_tracked
         self._p2_tracked = p2_tracked