Git branch imports now in public beta

Launchpad is all about bringing free software activity together in one place: it gives you one page to view the same bug as it is tracked in multiple places, you can hold discussions with other people using mailing lists and you can import code from around the web ready to use in a Bazaar branch.

Kiko calls it the great source code supermarket. Using Launchpad and Bazaar, you can access the code and version control history of projects who host their Bazaar branches or Subversion and CVS repositories pretty much anywhere on the net.

This month, we’ve added Git branches.

Try it out, tell us how you get on

Now Launchpad can import a project’s Git branch, using Bazaar’s bzr-git plugin, into a Bazaar branch hosted on Launchpad. We’re considering this as a public beta so we really want to know how you get on. Either post here or join us on the launchpad-users list.

There’s one significant limitation in this public beta: it won’t yet import Linux kernel branches. Jelmer, who has done much of the work on bzr-git, explains:

“As part of the Git network protocol Bazaar has to inform the Git server of the checksums of the Git revisions it already has, so the server doesn’t send it the full repository each time. To calculate these SHA1s Bazaar
has to bit-for-bit reconstruct the original Git revisions from the revisions that have been imported into Bazaar earlier.

The first versions of git did not normalize file modes, and this in some situations led to file modes that can not be represented in Bazaar. This makes it impossible to recalculate the checksum of the original revision from the data in Bazaar.”

You get the Git branch’s version history and it works just like any other Bazaar branch. Launchpad then regularly pulls the latest version of the Git branch into the Bazaar branch.

For now, Launchpad will import master Git branches only. We’re looking at ways of importing non-master branches.

Request an import and let us know how you get on.

4 Responses to “Git branch imports now in public beta”

  1. Geoff Hutchison Says:

    OK, we’ll give it a try. Will there be some mechanism where you can point the “trunk” branch at the Git repository? I’m sure there are lots of projects like ours, where people migrated from CVS or SVN to Git.

  2. Eitan Says:

    Cool!

    Will these branches be writable? Will it be pushed automatically to the origin git repo?

  3. Michael Hudson Says:

    @Geoff, there’s no smooth way to convert from a svn import to a git import yet. It’s a problem that we need to solve, but there are unanswered questions to be tackled first.

    @Eitan: no, the import branches will not be writable. If you have access, and have bzr-git installed, you can bzr dpush your changed to the remote git branch.

  4. Wojciech Stryjewski Says:

    What about the “bar git-serve” command? Is there any future possibility of allowing git:// and git+ssh:// access to a Bazaar repository hosted on Launchpad?

Leave a Reply