Patchwork [3,of,6] merge: indent to prepare for next patch

login
register
mail settings
Submitter Martin von Zweigbergk
Date Nov. 25, 2014, 5:22 a.m.
Message ID <5686367c7f2b06b954bd.1416892969@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6844/
State Accepted
Commit d9ebb475eedeedfdd382b5c745db2142542344ab
Delegated to: Pierre-Yves David
Headers show

Comments

Martin von Zweigbergk - Nov. 25, 2014, 5:22 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@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

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