Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting bazaar repo to git on linux

Tags:

git

github

bazaar

How can I convert bazaar repo to git? I have old zip archive with .bzr directory in it.

I've try to follow this tutorial but when I try to install:

sudo apt-get install bzr-fastimport

it got error that there are no bzr-fastimport package and there is python-fastimport I've install it but

bzr fast-export --plain `pwd`

show error:

bzr: ERROR: unknown command "fast-export"

I've also try to follow the solution in answer to this question: The right way to convert from bazaar to git and sync them

I've created new repo on github but when I called:

bzr dpush https://github.com/jcubic/aikiframework.git,branch=master

I've got error:

bzr: ERROR: Not a branch: "https://github.com/jcubic/aikiframework.git,branch=trunk/".
like image 328
jcubic Avatar asked Jan 05 '23 13:01

jcubic


1 Answers

An alternative way to get the fastimport plugin for Bazaar (instead of downloading the Yakkety Yak package as suggested in this answer) is to get it directly from its upstream source on Launchpad (thanks to this blog post by Robin Winslow):

cd ~/.bazaar/plugins
bzr branch lp:bzr-fastimport fastimport

Then you can go back to the directory containing your bzr repo and do the conversion:

git init 
bzr fast-export --plain . | git fast-import 
like image 118
ph0t0nix Avatar answered Jan 12 '23 00:01

ph0t0nix