Mercurial > hg-stable
changeset 44246:faec51c76b7b
merge: avoid a negation in the definition of updatedirstate
We only use `partial` in one place: the definition of
`updatedirstate`. Let's simplify that a little.
Differential Revision: https://phab.mercurial-scm.org/D7900
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 15 Jan 2020 15:12:50 -0800 |
parents | ae9310709c13 |
children | 4263aaab651d |
files | mercurial/merge.py |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Fri Jan 24 08:32:35 2020 -0800 +++ b/mercurial/merge.py Wed Jan 15 15:12:50 2020 -0800 @@ -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