diff hgext/convert/monotone.py @ 8124:d883bfbd2e60

convert/mtn: handle directory move into moved directory (issue1619/3)
author Patrick Mezard <pmezard@gmail.com>
date Wed, 22 Apr 2009 10:25:05 +0200
parents 933b874e402f
children da9f3866c637
line wrap: on
line diff
--- a/hgext/convert/monotone.py	Tue Apr 21 22:31:16 2009 +0200
+++ b/hgext/convert/monotone.py	Wed Apr 22 10:25:05 2009 +0200
@@ -160,6 +160,10 @@
                     continue
                 if tofile.startswith(todir + '/'):
                     renamed[tofile] = fromdir + tofile[len(todir):]
+                    # Avoid chained moves like:
+                    # d1(/a) => d3/d1(/a)
+                    # d2 => d3
+                    ignoremove[tofile] = 1
             for tofile, fromfile in renamed.items():
                 self.ui.debug (_("copying file in renamed dir from '%s' to '%s'") 
                                % (fromfile, tofile), '\n')