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!

8 comments:

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

    ReplyDelete
  2. 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.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. 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!

    ReplyDelete
  5. 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.

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

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

    ReplyDelete