Patchwork [2,of,4,V2] merge: duplicate 'if f in copied' into each branch

login
register
mail settings
Submitter Martin von Zweigbergk
Date Dec. 4, 2014, 5:15 a.m.
Message ID <f335a578687feba71e75.1417670150@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6995/
State Accepted
Commit 9f4ac44a727378696b45d6244f2e221c343415be
Headers show

Comments

Martin von Zweigbergk - Dec. 4, 2014, 5:15 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1416784130 28800
#      Sun Nov 23 15:08:50 2014 -0800
# Node ID f335a578687feba71e75751fac6d0d43326e8829
# Parent  a83394de0a4f71f25766f9797948b92a49e9f175
merge: duplicate 'if f in copied' into each branch

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -441,10 +441,10 @@ 
                 else: # both changed something
                     actions['m'].append((f, (f, f, f, False, pa.node()),
                                    "versions differ"))
-        elif f in copied: # files we'll deal with on m2 side
-            pass
         elif n1: # file exists only on local side
-            if f in movewithdir: # directory rename, move local
+            if f in copied:
+                pass # we'll deal with it on m2 side
+            elif f in movewithdir: # directory rename, move local
                 f2 = movewithdir[f]
                 actions['dm'].append((f2, (f, fl1),
                                 "remote directory rename - move from " + f))
@@ -467,7 +467,9 @@ 
                 else:
                     actions['r'].append((f, None, "other deleted"))
         elif n2: # file exists only on remote side
-            if f in movewithdir:
+            if f in copied:
+                pass # we'll deal with it on m1 side
+            elif f in movewithdir:
                 f2 = movewithdir[f]
                 actions['dg'].append((f2, (f, fl2),
                                 "local directory rename - get from " + f))