hgext/convert/bzr.py
changeset 8127 17ab4dab50a6
parent 8046 f3ef8a352d83
parent 8126 13b36eb14324
child 8149 ddbee2d0d634
--- a/hgext/convert/bzr.py	Wed Apr 22 20:15:55 2009 -0300
+++ b/hgext/convert/bzr.py	Thu Apr 23 16:52:25 2009 +0200
@@ -148,6 +148,11 @@
             # bazaar tracks directories, mercurial does not, so
             # we have to rename the directory contents
             if kind[1] == 'directory':
+                if kind[0] not in (None, 'directory'):
+                    # Replacing 'something' with a directory, record it
+                    # so it can be removed.
+                    changes.append((self.recode(paths[0]), revid))
+
                 if None not in paths and paths[0] != paths[1]:
                     # neither an add nor an delete - a move
                     # rename all directory contents manually