Export from bzr / Import to git results in a deleted file re-appearing
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Bazaar Fast Import |
Undecided
|
Unassigned | ||
| | bzr-fastimport (Ubuntu) |
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)) on 2015-07-28
- Bazaar Developers: Pending requested 2015-05-04
-
Diff: 61 lines (+23/-0)1 file modifiedexporter.py (+23/-0)
| Andreas Schwab (schwab-linux-m68k) wrote : | #1 |
| Felix Natter (fnatter) wrote : | #2 |
Thank you! This fixes my problem.
| Torsten Bronger (bronger) wrote : | #3 |
Fixed this problem for me, too. Why isn't the patch included yet?
| Unit 193 (unit193) wrote : | #4 |
In attempt to at least get the fix in the distribution if not upstream, debdiff attached.
| Simon Quigley (tsimonq2) wrote : | #5 |
Uploaded to Artful. Thanks Unit193!
| Changed in bzr-fastimport (Ubuntu): | |
| status: | New → Fix Committed |
| Launchpad Janitor (janitor) wrote : | #6 |
This bug was fixed in the package bzr-fastimport - 0.13.0+
---------------
bzr-fastimport (0.13.0+
* d/p/fix_
Fix a case where deleteion of an entry in a renamed directory is not
reproduced correctly in fast-export. Thanks to Harry Hirsch, Nuno Araujo,
and Andrew Huff.
* d/control: Build-depend on dh-python.
-- Unit 193 <email address hidden> Mon, 19 Jun 2017 18:05:06 -0400
| Changed in bzr-fastimport (Ubuntu): | |
| status: | Fix Committed → Fix Released |


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: