copies: don't double-detect items in the directory copy check
authorMatt Mackall <mpm@selenic.com>
Sat, 29 Mar 2008 12:39:47 -0500
changeset 6426 e2c49ef2dd6e
parent 6425 2d9328a2f81f
child 6427 6b704ef9ed06
copies: don't double-detect items in the directory copy check
mercurial/copies.py
--- a/mercurial/copies.py	Sat Mar 29 12:39:47 2008 -0500
+++ b/mercurial/copies.py	Sat Mar 29 12:39:47 2008 -0500
@@ -185,8 +185,9 @@
                 if f.startswith(d):
                     # new file added in a directory that was moved, move it
                     df = dirmove[d] + f[len(d):]
-                    copy[f] = df
-                    repo.ui.debug(_("  file %s -> %s\n") % (f, copy[f]))
+                    if df not in copy:
+                        copy[f] = df
+                        repo.ui.debug(_("  file %s -> %s\n") % (f, copy[f]))
                     break
 
     return copy, diverge