Export from bzr / Import to git results in a deleted file re-appearing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar Fast Import |
New
|
Undecided
|
Unassigned | ||
breezy (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
bzr-fastimport (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
hi,
I did the following:
mkdir freeplane-git1
cd freeplane-git1
git init .
bzr fast-export --export-
git checkout
This seems to succeed, but the resulting working index is broken, e.g.:
freeplane-
contains SpreadSheetUtil
'org.freeplane
You can check out the public freeplane repo like this:
bzr branch bzr://freeplane
Of course I am not sure that this a bzr- (vs a git-) issue.
I am using Bazaar (bzr) 2.5.0dev6, bzr-fastimport 0.13.0 and git 1.7.10.
Thank you and Best Regards,
Felix
Related branches
- Richard Wilbur: Needs Information (needs test(s))
- Bazaar Developers: Pending requested
-
Diff: 61 lines (+23/-0)1 file modifiedexporter.py (+23/-0)
Changed in bzr-fastimport (Ubuntu): | |
status: | New → Fix Committed |
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'
renamed_ already = set(old_ to_new. keys())
still_ to_be_renamed = set(must_ be_renamed. keys()) - renamed_already still_to_ be_renamed) :
new_ child_path = must_be_ renamed[ old_child_ path]
self.note( "implicitly renaming %s => %s" % (old_child_path,
--- exporter.py 2012-05-08 14:38:44 +0000
+++ exporter.py 2012-07-13 14:08:50 +0000
@@ -559,6 +559,9 @@
for old_child_path in sorted(
+ # Deleted files should not be renamed
+ if old_child_path in deleted_paths:
+ continue
if self.verbose: