Mercurial > hg
changeset 44165:ae9310709c13
merge: move definition of `partial` closer to where it's used
Differential Revision: https://phab.mercurial-scm.org/D7983
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 24 Jan 2020 08:32:35 -0800 |
parents | 45192589555c |
children | faec51c76b7b |
files | mercurial/merge.py |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Wed Jan 22 13:06:56 2020 -0800 +++ b/mercurial/merge.py Fri Jan 24 08:32:35 2020 -0800 @@ -2288,13 +2288,6 @@ ), ) ) - # 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 with repo.wlock(): if wc is None: wc = repo[None] @@ -2507,6 +2500,13 @@ ### apply phase 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() if updatedirstate: repo.hook(b'preupdate', throw=True, parent1=xp1, parent2=xp2)