mercurial/merge.py
changeset 3371 8c36b33a27c7
parent 3316 39fd6e82ea38
child 3372 ba7c74081861
--- a/mercurial/merge.py	Thu Oct 12 12:15:56 2006 -0700
+++ b/mercurial/merge.py	Thu Oct 12 14:49:19 2006 -0500
@@ -87,12 +87,12 @@
 
     return action
 
-def nonoverlap(d1, d2):
-    "Return list of elements in d1 not in d2"
+def nonoverlap(d1, d2, d3):
+    "Return list of elements in d1 not in d2 or d3"
 
     l = []
     for d in d1:
-        if d not in d2:
+        if d not in d3 and d not in d2:
             l.append(d)
 
     l.sort()
@@ -116,12 +116,12 @@
     old.sort()
     return old
 
-def findcopies(repo, m1, m2, limit):
+def findcopies(repo, m1, m2, ma, limit):
     """
     Find moves and copies between m1 and m2 back to limit linkrev
     """
 
-    if not repo.ui.config("merge", "followcopies"):
+    if not repo.ui.configbool("merge", "followcopies", True):
         return {}
 
     # avoid silly behavior for update from empty dir
@@ -131,8 +131,8 @@
     dcopies = repo.dirstate.copies()
     copy = {}
     match = {}
-    u1 = nonoverlap(m1, m2)
-    u2 = nonoverlap(m2, m1)
+    u1 = nonoverlap(m1, m2, ma)
+    u2 = nonoverlap(m2, m1, ma)
     ctx = util.cachefunc(lambda f,n: repo.filectx(f, fileid=n[:20]))
 
     def checkpair(c, f2, man):
@@ -194,7 +194,7 @@
         action.append((f, m) + args)
 
     if not (backwards or overwrite):
-        copy = findcopies(repo, m1, m2, pa.rev())
+        copy = findcopies(repo, m1, m2, ma, pa.rev())
 
     # Compare manifests
     for f, n in m1.iteritems():