4

I'm struggling with a migration from Bazzar to Git. When I execute export/import command below, it crashes because of the error. But there is no instruction what should I do next. Could anyone please tell me how to resolve it?

Execute command

% bzr fast-export --export-marks=marks.bzr ../trunk | git fast-import --export-marks=marks.git

Error

fatal: Path xxx not in branch
fast-import: dumping crash report to .git/fast_import_crash_14082
bzr: broken pipe
  • Other information
    The number of revision is over 30,000.

Found a similar situation, but it haven't resolved the problem yet.
git fast-export format and spaces

Tried with several options, but every command failed, too.

% bzr fast-export --plain --rewrite-tag-names --export-marks=marks.bzr ../trunk | git fast-import --export-marks=marks.git --force
% bzr fast-export --baseline --rewrite-tag-names --export-marks=marks.bzr ../trunk | git fast-import --export-marks=marks.git
% bzr fast-export --rewrite-tag-names --export-marks=marks.bzr ../trunk | git fast-import --export-marks=marks.git --force
Community
  • 1
  • 1
mttr
  • 49
  • 7
  • Now trying to the other way. 'git-remote-bzr' https://github.com/felipec/git-remote-bzr and 'bzr-git' https://launchpad.net/bzr-git/+download – mttr May 22 '15 at 12:49
  • I got an error with git-remote-bzr, so issued on a github. https://github.com/felipec/git-remote-bzr/issues/14 – mttr May 26 '15 at 07:00

1 Answers1

0

Let's try with the dpushcommand.
I successfully exported many small and large repositories (not 30k rev indeed) with this.

Just two steps:

Step1: Create a Git bare repository
From bazaar, create a Git bare repository with the init command.

bzr init --format=git-bare

Step2: Export your project
Push you project in this newly created Git repository with the dpush command.

bzr dpush myfolder/myNewGitrepo.git

note: myNewGitrepo.git was created in step 1 of course.

TridenT
  • 4,879
  • 1
  • 32
  • 56
  • Unfortunately got error and failed. Here is the part of stack trace. It's ok for me just to skip such a invalid(cannot export) commit, but is there any idea? Should I do hack the lib? **File "/usr/local/Cellar/bazaar/2.6.0/libexec/bzrlib/inventory.py", line 1868, in __getitem__ raise errors.NoSuchId(self, file_id) NoSuchId: The file id "None" is not present in the tree .** – mttr May 31 '15 at 16:10
  • 1
    Found a similar bug report, but no work around so far... https://bugs.launchpad.net/bzr-git/+bug/937235 – mttr May 31 '15 at 16:42
  • bzr-git doesn't help, too :( Now checking git-bzr-ng... https://bugs.launchpad.net/bzr-git/+bug/1460459 – mttr Jun 05 '15 at 07:48