bzr-fastimport wrongly re-exports tags

Bug #655839 reported by Gabriel Filion
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Fast Import
Medium
Unassigned

Bug Description

With current trunk, if I use "bzr fast-export" with an unexistant mark file, piping its imput into "git fast-import" works fine. But doing it again with the mark file that was generated by the first run (no modification in the Bazaar repo) makes "git fast-import" crash.

Examining the output stream of the second run reveals the problem:

reset refs/tags/something
from :1

I have only one tag in the bzr repo. But bzr-fastimport doesn't seem to remember that the tag was already exported in the first run, so it outputs this again. But since the :2 mark is not re-exported, the stream is inconsistent.

We need to add some info in mark files generated by bzr fast-export to remember not to re-export the tag again.

script to test this out:

bzr init test.bzr
(cd test.bzr && echo content >file && bzr add && bzr commit -m first && bzr tag something)
git init test.git
(cd test.git && bzr fast-export --export-marks=../marks ../test.bzr | git fast-import)
(cd test.git && bzr fast-export --export-marks=../marks --import-marks=../marks ../test.bzr | git fast-import)

Revision history for this message
Gabriel Filion (gabriel-filion) wrote :

I have confirmed with fullermd and vila on #bzr and there's no unique id associated to a tag. so we could use something like the following in the marks file:

:n tag_name:revid

Revision history for this message
Gabriel Filion (gabriel-filion) wrote :

maybe a more elegant method would be to generate a unique id for tags that looks like an id for a commit. no changes would be needed for parsing marks files and we would simply have to generate the hashes on export. it would then be possible to verify tags against this unique id.

Jelmer Vernooij (jelmer)
Changed in bzr-fastimport:
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers