Patchwork D7900: merge: avoid a negation in the definition of updatedirstate

login
register
mail settings
Submitter phabricator
Date Jan. 24, 2020, 11:27 p.m.
Message ID <1a96e80a16ef9a51064b76bb64006ab1@localhost.localdomain>
Download mbox | patch
Permalink /patch/44635/
State Not Applicable
Headers show

Comments

phabricator - Jan. 24, 2020, 11:27 p.m.
Closed by commit rHGfaec51c76b7b: merge: avoid a negation in the definition of updatedirstate (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7900?vs=19554&id=19577

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7900/new/

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

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: pulkit, mercurial-devel

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -2501,13 +2501,9 @@ 
         if not branchmerge:  # just jump to the new rev
             fp1, fp2, xp1, xp2 = fp2, nullid, xp2, b''
         # If we're doing a partial update, we need to skip updating
-        # the dirstate, so make a note of any partial-ness to the
-        # update here.
-        if matcher is None or matcher.always():
-            partial = False
-        else:
-            partial = True
-        updatedirstate = not partial and not wc.isinmemory()
+        # the dirstate.
+        always = matcher is None or matcher.always()
+        updatedirstate = always and not wc.isinmemory()
         if updatedirstate:
             repo.hook(b'preupdate', throw=True, parent1=xp1, parent2=xp2)
             # note that we're in the middle of an update