mercurial/copies.py
changeset 30188 8a864844d5a0
parent 30186 f7ed5af31242
child 30193 368e27eb1ffa
--- a/mercurial/copies.py	Sun Oct 16 10:38:52 2016 -0700
+++ b/mercurial/copies.py	Wed Oct 12 21:33:45 2016 +0200
@@ -543,7 +543,8 @@
         # unrelated to the droids we are looking for.
         cr = _related(oc, c2, base.rev())
         if cr and (of == f or of == c2.path()): # non-divergent
-            data['copy'][f] = of
+            if of in mb:
+                data['copy'][f] = of
             return
 
     if of in mb: