bzr fast-export can generate buggy data

Bug #1002405 reported by Ken Phillis Jr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Fast Import
Expired
Undecided
Unassigned

Bug Description

when i was trying to use the fast exporter to rapidly fill in a git tree, I found that if the tree contains malformed commits, it forces an exceedingly harsh set of rebase to correct the issue. A prime example of this is within the official bazaar repository for grub ( see Revision 2266 and 3144 ). It is safe to assume that most developers will probably not want to mess with fixing invalid commit information, and would prefer that the tools take care of this automatically.

step 1) Get a local copy of the grub repository:

bzr branch http://bzr.savannah.gnu.org/r/grub/trunk/grub

step 2) Confirm the existance of the buggy commits:
cd grub
bzr log | grep author\:\ $ -a8

step 3) look at the fast export of these commits...

bzr fast-export -r 2265..2266|less

bzr fast-export -r 3143..3144|less

step 4) attempting to import these commits into git will cause an invalid case.

Revision history for this message
Ken Phillis Jr (kphillisjr) wrote :
Revision history for this message
Ken Phillis Jr (kphillisjr) wrote :
Revision history for this message
Ken Phillis Jr (kphillisjr) wrote :

A example of a valid commit that is probably the best solution to use... Namely automatically silence lines where the commit has no author defined, or the author that is defined is empty.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

How are you generating the fastexport stream? Note that you may have to use --plain to generate a fastimport file that git-fastimport can read.

Changed in bzr-fastimport:
status: New → Incomplete
Revision history for this message
Ken Phillis Jr (kphillisjr) wrote :

I am generating the fastexport from a fresh copy of the official bazaar branch.

Anyways, here are the exact commands I am using to generate the fast export.
 bzr fast-export -r 2265..2266 > ../grub-r2265to2266.txt
 bzr fast-export --plain -r 2265..2266 > ../grub-r2265to2266-plain.txt

Revision history for this message
Ken Phillis Jr (kphillisjr) wrote :
Revision history for this message
Ken Phillis Jr (kphillisjr) wrote :

I went ahead and looked at the exporter code, and I think I have a reasonable solution to fix this bug. Simply print the Author line only when an email and Name for the author field are set.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Bazaar Fast Import because there has been no activity for 60 days.]

Changed in bzr-fastimport:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.