mercurial/copies.py
changeset 30204 1894c830ee74
parent 30203 b94b92f0c683
child 30208 87a7c0d403ff
--- a/mercurial/copies.py	Tue Oct 11 04:25:59 2016 +0200
+++ b/mercurial/copies.py	Tue Oct 11 04:39:47 2016 +0200
@@ -611,6 +611,7 @@
     """
 
     mb = base.manifest()
+    mta = tca.manifest()
     # Might be true if this call is about finding backward renames,
     # This happens in the case of grafts because the DAG is then rotated.
     # If the file exists in both the base and the source, we are not looking
@@ -665,8 +666,17 @@
                         break
             return
 
-    if of in mb:
-        data['diverge'].setdefault(of, []).append(f)
+    if of in mta:
+        if backwards or remotebase:
+            data['incomplete'][of] = f
+        else:
+            for sf in seen:
+                if sf in mb:
+                    if tca == base:
+                        data['diverge'].setdefault(sf, []).append(f)
+                    else:
+                        data['incompletediverge'][sf] = [of, f]
+                    return
 
 def duplicatecopies(repo, rev, fromrev, skiprev=None):
     '''reproduce copies from fromrev to rev in the dirstate