Friday, October 09, 2009

Mercurial server-side clone support for Project Hosting on Google Code

When we launched Mercurial support our goal was to get to a point where we could enable a social coding experience. Today, I am happy to announce that today we have support for both 'project' clones and 'user' clones.

Project owners can now create multiple repositories for their project, and they can choose to make any of those new repositories a clone of any of the project's other repositories. These project clones share the same commit access permissions as the original project and make it easier for project members to work together on new features. A common pattern in the Mercurial world is to place each "official" branch into a separate repository with naming conventions like "project-crew", "project-stable", and so on.

In addition to project clones, any user can visit any Mercurial repository and create a server-side user clone of that repository, without asking permission from the project owner. These personal user clones can be easily shared with other developers -- who also can make a clone of that clone. Once a user has finished her changes in a user clone, she can coordinate with the canonical project's contributors to review and incorporate her changes.

User clones aren't forks, in the traditional sense, where a fork has little intention to contribute back to the original project. Rather, the entire purpose of a user clone is to allow users to contribute to projects without requiring official commit access permissions. Because mercurial is a distributed (peer-to-peer) version control system, it excels at branching and merging. If the project maintainers like the new code, they just "pull" the changesets from the clone and merge them into an official project repository. It's all much more elegant than emailing patches back and forth, anonymous contributors get to use the same tools as core developers.

The instructions for creating a user clone can be found on the checkout page for any Mercurial project (e.g. twisty) and existing clones for a project can be found under the Clones sub-tab under Source.

Please let us know if you have any feedback or find any issues. Happy cloning!


  1. Wishfully exclaiming "Happy cloning!" is pretty ironic. This feature is a blatant "clone" of's approach to project collaboration. Why not at least acknowledge them and give credit where credit is due?

  2. Jay: You're giving GH too much credit. Stop hating and either use the feature or shutup.

  3. I really appreciate this feature, but I have to be honest. The overall Google Code Project Hosting site is in dire need of a UI overhaul. The projects people follow and are owners of seem too isolated. There is a need for a better integration. This is especially true for the would-be dashboard:

  4. Jay, this is one of the ways that distributed version control is supposed to work, so GitHub has nothing special in this respect. Launchpad could well be prior art to GitHub in this respect, but the very use of distributed version control would be prior art to Launchpad.

  5. This comment has been removed by the author.

  6. Both, Mercurial and Git, where publicly announced in 2005. Both are very fine distributed version control systems and I am happy to see that Google now supports one of them. No need to bitch around!

  7. good to find advancements here where my request is
    why not integrate deployement, versioncontrol and codeedits like this

    onlineworkuiintegrated onlinecodeeditor defines working environment not
    only adminui, workui, not only adminui, integrated dev htmlui:
    -codeeditor ie workui
    -vcs sync
    -adminui ie nobrainer already
    -easy quick adjust obvious instead of local
    -facilitates quickedits even extreme strenous, all dev needs telnet or
    tunnel, no windowmanager=superior performance and security

  8. I think this feature would be a lot more useful if non-project-owners could create clones and own them. Launchpad has a facility like that and it's very good.

  9. Don't let the haters get you down. This is an amazing feature, and I for one can't thank you enough.

  10. Tom, I had the impression that that is what the server-side personal user clones are about.