Contribute to Labs Projects on Github!

In late 2006 Mozilla made a decision to move to the mercurial distributed version control system. Today most Mozilla projects are available in a publicly accessible mercurial instance. This has served Mozilla well for many years, however many of us in Labs have watched the developments and rising popularity of git with interest. In response to a growing number of requests from the community, we have decided to start mirroring all of the current Mozilla Labs experiments to github!

Github is a very popular social coding site, who provide git hosting in addition to several tools to support collaboration, discovery, and visualization of software projects. Our hope is that by hosting projects there we’ll make it easier for more folks in the community to find, follow, and work on Labs experiments.

What’s happening to mercurial?

For now, this mirroring is very much an experiment. The Labs mercurial repositories will remain the primary place where commits are pushed. So as far as mercurial is concerned, nothing changes. That said, some projects are considering moving to git as the primary host for code, and conversations with the community are ongoing.

How can I contribute via github?

For now, the process is very lightweight. Simply fork the project that you’re interested in contributing and issue a pull request. These requests will be treated as “review requests” and will need to be merged back into the primary repository by someone with commit access.

How’s it work?

Mirroring from mercurial to git is trivial given the availability of hg-git, a mercurial extension which allows you to interact with a remote git repo directly from the mercurial client. Leveraging this extension, we pull from mercurial and push to github. By also using the Github API, it’s very simple to automate the batch creation of multiple repositories and make it simple to add new repositories to the mirroring as new projects are launched. The scripts that we use to perform the mirroring are themselves hosted on github.

What’s Next?

Several folks have kicked around ideas on how to improve the submission flow, including streamlining the creation of review requests by automatically converting pull requests on github into formal Bugzilla review requests. Some people from the community are already exploring these ideas, so stay tuned.

Happy forking!