Migrating a bazaar branch to git

Tools

Install a bzr handler for git:

Preferred: http://packages.debian.org/experimental/git-bzr - git-bzr (1:1.8.3-1)

Alternative: http://packages.qa.debian.org/g/git-bzr-ng.html

https://launchpad.net/ubuntu/saucy/+package/git-bzr-ng

(also in raring)

Purpose

Packaging

Usage

These are my own commands from history, the URL's and shorthand will change...

I used the ssh:// locations from the git.linaro.org view of the repository, changing ssh://git.linaro.org for my own ~/.ssh/config shorthand to embed the username and select the appropriate key.

mkdir git/
git bzr clone lp:lava-scheduler
cd lava-scheduler/
git remote add gitlinaro gitlinaro:/srv/git.linaro.org/git/people/neilwilliams/lava-scheduler.git
git push  gitlinaro master
bash: warning: setlocale: LC_ALL: cannot change locale (en_GB.UTF-8)
Counting objects: 4387, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1764/1764), done.
Writing objects: 100% (4387/4387), 2.04 MiB, done.
Total 4387 (delta 2585), reused 4387 (delta 2585)
To gitlinaro:/srv/git.linaro.org/git/people/neilwilliams/lava-scheduler.git
 * [new branch]      master -> master

Now move .bzrignore to .gitignore and edit it so that git status is clean, commit and push.

Issues

Some reports of tags not being imported.

Adding bzr branches as git remotes

Use the bzr:: prefix to reference a bazaar branch in git:

$ cd git/lava-dispatcher/
$ git remote add terceirokvm bzr::lp:~terceiro/lava-dispatcher/kvm
$ git remote show terceirokvm 
* remote terceirokvm
  Fetch URL: bzr::lp:~terceiro/lava-dispatcher/kvm
  Push  URL: bzr::lp:~terceiro/lava-dispatcher/kvm
  HEAD branch: master
  Remote branch:
    master tracked
  Local ref configured for 'git push':
    master pushes to master (create)
$ git puil terceirokvm master

Resources

http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/

This was done in the lava-server package to copy the lava.recipes tree from lava-manifest whilst retaining history.

Branches

https://git.linaro.org/gitweb?p=people/neilwilliams/lava-dispatcher.git;a=summary

https://git.linaro.org/gitweb?p=people/neilwilliams/lava-scheduler.git;a=summary

https://git.linaro.org/gitweb?p=people/neilwilliams/lava-server-debian.git;a=summary

https://git.linaro.org/gitweb?p=people/neilwilliams/lava-deployment-tool.git;a=summary

https://git.linaro.org/gitweb?p=people/neilwilliams/linaro-dashboard-bundle.git;a=summary

https://git.linaro.org/gitweb?p=people/neilwilliams/lava-group.git;a=summary

https://git.linaro.org/gitweb?p=people/neilwilliams/lava-deployment-tool.git;a=summary

Bazaar2Git (last modified 2013-08-21 20:29:30)