Delete of entry in renamed directory not reproduced correctly in fast-export
Bug #430347 reported by
Harry Hirsch
This bug affects 9 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar Fast Import |
Triaged
|
Medium
|
Unassigned |
Bug Description
Consider the following scenario:
$ bzr mv x y # x is a directory, y does not exist yet
$ bzr rm y/z
$ bzr commit
This is reproduced by fast-export as follows:
R x y
R x/z y/z
D x/z
This means "z" is deleted when it has been renamed already. When importing this in git this leaves "y/z" untouched so that the delete is not reproduced at all.
The expected output would be something like the following:
D x/z
R x y
Attached you can find a patch that tries to fix this issue. It has been tested and is working on the test case above and a production repository (around 200 revisions) containing multiple operations like this.
Related branches
lp://staging/~unit193/bzr-fastimport/deletion-fixes
Ready for review
for merging
into
lp://staging/bzr-fastimport
- 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: | |
status: | New → Triaged |
importance: | Undecided → Medium |
To post a comment you must log in.
I have the same problem (while using git-bzr who depends on fast-import).
When I applied Harry Hirsch's patch, I had an error message (see attached file).
I updated the patch (see next attachment) and it applies correctly and works correctly now (applied on r301).