Mercurial at Savannah

To use Mercurial on Savannah, you first need to enable it for your group; then a cron job will create an empty repository, see VCS Intro.

URL summary

  • ssh:// - developer access using SSH
  • - lightweight http-based protocol (read-only access)
  • Web viewer

Basic commands

Checkout with authentication:

hg clone ssh://

For the SSH key fingerprints for, check the "Mercurial Repository" link under "Development Tools" on the main page of your group.

Checkout with anonymous read-only access:

hg clone

or hg clone

Developer setup

Your identity for when you push commits (strongly recommended) editing your user configuration file (\~/.hgrc):

username = Your Name Comes Here <>

It is also possible to edit per group identity (group/.hg/hgrc).

Developer basic commands

Initial import

If you are creating a new project and wish to upload a fresh repository, proceed as follows to create the repository on your machine:

mkdir test
cd test
hg init
touch README
# edit/add other files...
# Import everything:
hg add .
hg commit -m "Initial import"

Alternatively, if you are importing an existing repository, just cd to the repository's top level.

Now fill the repository at Savannah:

hg push ssh://

Note: at this point your repository is not setup to merge _from_ the remote branch when you type 'hg pull'. You can either freshly 'clone' the repository (see "Developer checkout" below), or configure your current repository this way:

Edit group/.hg/hgrc:

default = ssh://

Developer checkout

hg clone ssh://


cd group/

# <edit some_existing_file>
hg commit -m "I automatically commit modified files"

# <edit some_new_file and something_else>
hg add some_new_file
hg commit -m "I only marked some_new_file and other changes for commit"


hg commit -A -m "I automatically add new files and commit any other changes"

# <only commit one modified file>
touch some_existing_file
hg commit -m "I only commit one file" some_existing_file

# Check your changes with the graphical tool
hg view

# Check what's going to be pushed
hg outgoing

# Send everything to Savannah
hg push

Importing from other VCS

Mercurial has a convert extension that supports multiple repository types (CVS, Subversion, GNU Arch, Git, darcs...).

You might get an error if the extension is not activated system-wide. In that case, edit your \~/.hgrc:

hgext.convert =

hg convert group
cd group-hg
hg push ssh://
  • CVS conversion will also maintain CVS tags.
  • GNU Arch conversion does not handle multiple branches or version numbers, thus it only works for a given category--branch--version.