Mercurial > hg-stable
changeset 42428:72522fe7fb95
merge: reorder some initialization to make more sense
This puts the closely related definitions of "pl", "p1", "p2", "pas"
close together, and moves the definition of "overwrite" away and
closer to where it's first used.
Differential Revision: https://phab.mercurial-scm.org/D6471
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 09 Mar 2019 22:11:27 -0800 |
parents | 4e4fa3a95406 |
children | a5b5ecff5f37 |
files | mercurial/merge.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Wed May 22 08:27:02 2019 +0000 +++ b/mercurial/merge.py Sat Mar 09 22:11:27 2019 -0800 @@ -1977,13 +1977,10 @@ wc = repo[None] pl = wc.parents() p1 = pl[0] + p2 = repo[node] pas = [None] if ancestor is not None: pas = [repo[ancestor]] - - overwrite = force and not branchmerge - - p2 = repo[node] if pas[0] is None: if repo.ui.configlist('merge', 'preferancestor') == ['*']: cahs = repo.changelog.commonancestorsheads(p1.node(), p2.node()) @@ -1993,6 +1990,7 @@ fp1, fp2, xp1, xp2 = p1.node(), p2.node(), bytes(p1), bytes(p2) + overwrite = force and not branchmerge ### check phase if not overwrite: if len(pl) > 1: