changeset 4398:3b7e284b8f28

merge: expand and simplify the invalid handling for directory moves
author Matt Mackall <mpm@selenic.com>
date Thu, 03 May 2007 17:24:43 -0500
parents 9fe267f77f56
children 93652499bed3
files mercurial/merge.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Thu May 03 17:24:43 2007 -0500
+++ b/mercurial/merge.py	Thu May 03 17:24:43 2007 -0500
@@ -205,11 +205,14 @@
         elif dsrc in dirmove and dirmove[dsrc] != ddst:
             # files from the same directory moved to two different places
             invalid[dsrc] = True
-            del dirmove[dsrc]
         else:
             # looks good so far
             dirmove[dsrc + "/"] = ddst + "/"
 
+    for i in invalid:
+        if i in dirmove:
+            del dirmove[i]
+
     del d1, d2, invalid
 
     if not dirmove: