"bzr fast-import" fails to import a data dump with rename/copy information

Bug #330206 reported by Teemu Likonen
0
Affects Status Importance Assigned to Milestone
Bazaar Fast Import
Triaged
Medium
Unassigned

Bug Description

Since Git version 1.6.0 "git fast-export" has options for detecting and generating file rename/copy information for the output dump. Git itself does not need nor use this information but it can be valuable for other version control systems.

Currently "bzr fast-import" (revision 92) exists with an error when trying to import a dump data which has either rename or copy commands generated by "git fast-export" with options "-M" or "-C". To demonstrate the issue I have attached two dump files.

File git-fast-export-C-C-rename.dump is the output of command "git fast-export -C -C [branch]" from a branch which introduces a simple file rename. When importing the dump to bzr the command "bzr fast-import" stops with the following error:

20:48:59 WARNING: resets are not supported yet - ignoring reset of 'refs/heads/rename'
bzr: ERROR: The file id "file.txt-20090216184859-6x722f2e5xq52gpe-2" is not present in the tree <Inventory object at 953c1ec, contents={'file.txt-20090216184859-6x722f2e5xq52gpe-1': InventoryFile('file.txt-20090216184859-6x722f2e5xq52gpe-1', u'file.txt', parent_id='TREE_ROOT', sha1='7cb34383ee7a5e5d7a941b56237eaebeb1d2a0b4', len=1504), 'TREE_ROOT': InventoryDirectory('TREE_ROOT', u'', parent_id=None, <email address hidden>')}>.

Similarly, attached file git-fast-export-C-C-copy.dump is the output of command "git fast-export -C -C [branch]" from a branch which introduces a simple file copy. "bzr fast-import" exists with the following error:

20:55:43 WARNING: resets are not supported yet - ignoring reset of 'refs/heads/copy'
bzr: ERROR: The file id "file.txt-20090216185543-d0ovlo6geixsdk29-2" is not present in the tree <Inventory object at a5f71ec, contents={'file.txt-20090216185543-d0ovlo6geixsdk29-1': InventoryFile('file.txt-20090216185543-d0ovlo6geixsdk29-1', u'file.txt', parent_id='TREE_ROOT', sha1='7cb34383ee7a5e5d7a941b56237eaebeb1d2a0b4', len=1504), 'TREE_ROOT': InventoryDirectory('TREE_ROOT', u'', parent_id=None, <email address hidden>')}>.

Revision history for this message
Teemu Likonen (dtw) wrote :
Revision history for this message
Teemu Likonen (dtw) wrote :

And here is the dump from a branch which introduces a file copy.

Revision history for this message
Teemu Likonen (dtw) wrote :

And I should have added that "git fast-export" with options "-M", "-C" or "-C -C" uses renaming and copying commands described in the "git fast-import" manual page:

http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html

(See "filecopy" and "filerename".)

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Support for resets was added yesterday. Give rev 109 or later a go.

Revision history for this message
Teemu Likonen (dtw) wrote :

Result is the same ERROR; just that WARNING about resets not being supported disappears.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Support for copies has been added in rev 114. I'm yet to try it with your data stream though.

Changed in bzr-fastimport:
importance: Undecided → Medium
status: New → Triaged
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.