I’ve stored my SOFA Statistics code on launchpad since 2009 and used bazaar (bzr) to do it. But a lot has changed since then and I know use git on a daily basis in my job. So I’d much rather use git for SOFA. Fortunately that is now possible on launchpad.
I found https://help.launchpad.net/Code/Git to be useful apart from the migration instructions. These didn’t work for me. For example, I had no luck installing sudo apt-get install bzr-fastimportInstead I found https://design.canonical.com/2015/01/converting-projects-between-git-and-bazaar/.
Need ~/.bazaar/plugins
If plugins folder not there, cd ~/.bazaar; mkdir plugins
cd ~/.bazaar/plugins
bzr branch lp:bzr-fastimport fastimport
cd ~/projects/SOFA/sofastatistics/sofa.repo/sofa.main/
git init
bzr fast-export --plain . | git fast-import
gitk --all
YES! It’s all there
Archive .bzr in case
USER is launchpad-p-s in my case (yes – a strange choice which made sense at the time)
PROJECT is sofastatistics
So as per
[url "git+ssh://USER@git.launchpad.net/"]
insteadof = lp:
added the following to ~/.gitconfig
[url "git+ssh://launchpad-p-s@git.launchpad.net/"]
insteadof = lp:
Note – if not using lp: etc I had trouble with my ssh key – possibly something to do with confusion between user g and user launchpad-p-s.
I own my own project so to implement git remote add origin lp:PROJECT I ran:
git remote add origin lp:sofastatistics
Note: would only work if insteadof setting added to ~/.gitconfig as described earlier https://help.launchpad.net/Code/Git
Otherwise I would have to git remote add origin git+ssh://git.launchpad.net/sofastatistics
As per https://launchpad.net/PROJECT/+configure-code. I.e.
https://launchpad.net/sofastatistics/+configure-code
Confirmed by making a check folder then cloning the code in: git clone git://git.launchpad.net/~launchpad-p-s/sofastatistics