Comment 1 for bug 1014291

Revision history for this message
Andreas Schwab (schwab-linux-m68k) wrote :

Reduced testcase:

bzr init
mkdir a
touch a/a a/b
bzr add a/*
bzr ci -m a
bzr rm a/b
bzr mv a b
bzr ci -m b
bzr fast-export -v .

15:59:28 implicitly renaming a/a => b/a
15:59:28 implicitly renaming a/b => b/b

The second rename should be skipped.

=== modified file 'exporter.py'
--- exporter.py 2012-05-08 14:38:44 +0000
+++ exporter.py 2012-07-13 14:08:50 +0000
@@ -559,6 +559,9 @@
             renamed_already = set(old_to_new.keys())
             still_to_be_renamed = set(must_be_renamed.keys()) - renamed_already
             for old_child_path in sorted(still_to_be_renamed):
+ # Deleted files should not be renamed
+ if old_child_path in deleted_paths:
+ continue
                 new_child_path = must_be_renamed[old_child_path]
                 if self.verbose:
                     self.note("implicitly renaming %s => %s" % (old_child_path,