Read-only Git mirror of public repositories now available

The SoundSoftware code site uses Mercurial as its native version control system. To make it easier to get on with systems that use Git instead, we're adding a read-only Git interface for the public projects on the site.
Added by Chris Cannam over 8 years ago

The SoundSoftware code site uses Mercurial as its native version control system. To make it easier to get on with people and systems that use Git instead, we've just added a simple read-only Git interface for the public projects on the site.

What's new

Each public project on this site now has a Git clone URL, that is the same as its Mercurial clone URL but with "hg" replaced by "git".

For example, given a public project named "myproject", the Mercurial repository has always been (and continues to be) available via a command like

$ hg clone https://code.soundsoftware.ac.uk/hg/myproject

And now the same repository, with all its history and branches, is now available via Git using

$ git clone https://code.soundsoftware.ac.uk/git/myproject

This is a read-only mirror: you can't push to this URL, it is simply silently updated to reflect the contents of the project's Mercurial repository. That update happens periodically so there may be a delay of up to an hour before each commit pushed to the Mercurial repo becomes available via Git. (We may reduce or eliminate this delay later on.)

The feature is designed as a repository mirror, not an endpoint for active everyday use. There is currently no access control for this service, so only public projects are made available in this way.

An example with a real project:

$ git clone https://code.soundsoftware.ac.uk/git/cepstral-pitchtracker

Use cases

1. You have a published software project (not one undergoing rapid development) and you want to publicise it to users who prefer Git (and who are not project members who would need commit access).

2. You have started a project on the SoundSoftware site and you decide later that you want to move it to, or mirror it on, Github. You can do that like this:

# create a bare git repository (not a working copy) containing
# the entire history and all branches:
$ git clone --mirror https://code.soundsoftware.ac.uk/git/myproject
$ cd myproject.git
# ... and mirror it to a Github repo:
$ git push --mirror --repo=git@github.com:myself/myproject.git

(Note that you can already do this the other way around, using the SoundSoftware site to mirror a project whose primary hosting is at Github. See the "Track an external repository" option in your project's Settings -> Repositories for details.)

Other limitations

  • The Git clone URL is not yet displayed in the project's repository page. We're still considering how this information should be shown, given that the Git repo is a mirror with some limitations rather than a "first-class" copy.
  • The Git clone URL can only be used with a Git client; you can't browse to it in a web browser.
  • Mercurial subrepositories are not converted, so if you clone a repo for a project that uses subrepos, you will get only the containing repository without any of the subrepos in it.

Comments