[PATCH 3 of 6] merge: indent to prepare for next patch
Martin von Zweigbergk
martinvonz at google.com
Tue Nov 25 05:22:49 UTC 2014
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1416874282 28800
# Mon Nov 24 16:11:22 2014 -0800
# Node ID 5686367c7f2b06b954bd8a5bb5504d863fd6fd71
# Parent f4262e45b7923d47b913abdec6c77bd8f14c194c
merge: indent to prepare for next patch
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -415,28 +415,29 @@
if partial and not partial(f):
continue
if n1 and n2:
- fa = f
- a = ma.get(f, nullid)
- if a == nullid:
- fa = copy.get(f, f)
- # Note: f as default is wrong - we can't really make a 3-way
- # merge without an ancestor file.
- fla = ma.flags(fa)
- nol = 'l' not in fl1 + fl2 + fla
- if n2 == a and fl2 == fla:
- actions['k'].append((f, (), "keep")) # remote unchanged
- elif n1 == a and fl1 == fla: # local unchanged - use remote
- if n1 == n2: # optimization: keep local content
+ if True:
+ fa = f
+ a = ma.get(f, nullid)
+ if a == nullid:
+ fa = copy.get(f, f)
+ # Note: f as default is wrong - we can't really make a 3-way
+ # merge without an ancestor file.
+ fla = ma.flags(fa)
+ nol = 'l' not in fl1 + fl2 + fla
+ if n2 == a and fl2 == fla:
+ actions['k'].append((f, (), "keep")) # remote unchanged
+ elif n1 == a and fl1 == fla: # local unchanged - use remote
+ if n1 == n2: # optimization: keep local content
+ actions['e'].append((f, (fl2,), "update permissions"))
+ else:
+ actions['g'].append((f, (fl2,), "remote is newer"))
+ elif nol and n2 == a: # remote only changed 'x'
actions['e'].append((f, (fl2,), "update permissions"))
- else:
- actions['g'].append((f, (fl2,), "remote is newer"))
- elif nol and n2 == a: # remote only changed 'x'
- actions['e'].append((f, (fl2,), "update permissions"))
- elif nol and n1 == a: # local only changed 'x'
- actions['g'].append((f, (fl1,), "remote is newer"))
- else: # both changed something
- actions['m'].append((f, (f, f, fa, False, pa.node()),
- "versions differ"))
+ elif nol and n1 == a: # local only changed 'x'
+ actions['g'].append((f, (fl1,), "remote is newer"))
+ else: # both changed something
+ actions['m'].append((f, (f, f, fa, False, pa.node()),
+ "versions differ"))
elif f in copied: # files we'll deal with on m2 side
pass
elif n1 and f in movewithdir: # directory rename, move local
More information about the Mercurial-devel
mailing list