uracoli logo Home - Downloads - Docs - Hardware - Source - News - Blog tiny230 photo

Link to the Savannah source code repository page https://savannah.nongnu.org/hg/?group=uracoli.

Mercurial Basics

Initially you will need to clone the repository:

  • Anonymous: hg clone http://hg.savannah.nongnu.org/hgweb/uracoli/
    Note: This anonymous method does not allow you to push changes to the server.

  • Developper: hg clone ssh://<USER>@hg.sv.gnu.org/uracoli
    This requires a Savannah account and the upload of your public ssh-key, see below.

In order to get the latest changes from the repository, do

  • hg incoming -pv to see what change sets will come in

  • hg pull to get the latest change sets

  • hg up to update the sources in the working directory

A regular development cycle would look so:

  1. Initially clone the repository with
    hg clone ssh://<USER>@hg.sv.gnu.org/uracoli

  2. Do your modifications and test it.

  3. Commit your changes locally with hg commit . -m "change of this or that"
    Note that the dot in the above command line is important.
    Without it, all changes anywhere in your uracoli-tree will be committed.

  4. Before you release changes to the server, please verify that nothing is broken, e.g. if you work in the uracoli directory, run scons all to see that everything builds.

  5. Once again confirm the changes that will go out
    hg outgoing -pv

  6. Finally push your changes to the server
    hg push

To learn more about the capabilities of Mercurial read http://mercurial.selenic.com/ and http://hgbook.red-bean.com/.

Using Mercurial under Windows

Downloads and Installation
Generate a new ssh-key

This step needs to be done, if you do not have an existing ssh-key.

  • run puttygen.exe and choose "Generate"

  • Enter a passphrase for the key.

  • Save the private key as ppk file. Do not give away this private key file, it contains your secret.

  • Save the public key file.

Import an existing ssh-key

If you have already generated a ssh-key under Linux, you need to convert it to the ppk format.

  • run puttygen.exe and choose "Load private Key", select the private key file id_rsa and enter the pass phrase.

  • Save the private key as ppk file.

  • Save the public key file.

Upload the private key to Savannah
Add the Savannah host to your list of known hosts
  • Run in a cmd.exe window the command plink -ssh <user>@hg.sv.nongnu.org. If you run this command for the first time, you will see the following message:

d:\develop>plink -ssh horst@hg.savannah.nongnu.org
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 1024 80:5a:b0:0c:ec:93:66:29:49:7e:04:2b:fd:ba:2c:d5
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
Store key in cache? (y/n) y
  • Now you should verify Savannahs ssh-rsa key that is shown in the message. Look at Savannah:SshAccess for further details. If the key is correct (or you are shure that you are connected with the right server) confirm the message "Store key in cache?" with "y". Note that the Putty tools store the knowh host keys in the registry under HKEY_CURRENT_USER\SoftWare\SimonTatham\PuTTY\SshHostKeys.

  • All previous steps went correct if you see the following message:

Using username "horst".
Linux vcs.savannah.gnu.org 2.6.32-5-xen-686 #1 SMP Wed Mar 9 01:27:54 UTC 2011 i

Interactive shell login is not possible for security reasons.
VCS commands are allowed.
Last login: Wed Nov 23 20:20:47 2011 from
You tried to execute:
Sorry, you are not allowed to execute that command.
Load the key into pageant.exe
  • If you run pageant.exe, an icon "PC wearing a black hat" is displayed in the system tray. Double click on the icon and choose "Add key", select the previously generated *.ppk file and enter the passphrase.

  • Alternatively you can run pageant \\path\\to\\your_private_key.ppk.

Initially clone the repositiory
  • Create a file %USERPROFILE%/Mercurial.ini. Type "echo %USERPROFILE%" in a cmd.exe window in order to see what directory the environment variable is pointing to.

  • Enter the following contents to the file %USERPROFILE%/Mercurial.ini. For other possible locations of the Mercurial configuration file see http://www.selenic.com/mercurial/hgrc.5.html.

user = <user>
ssh="C:\DevTools\bin\plink.exe" -ssh
  • Finally clone the repository with the command in a cmd.exe window with the command hg clone "ssh://<user>@hg.sv.nongnu.org"

  • Troubleshooting: If an error message like "FATAL ERROR: Network error: Connection timed out" after a certain timeout period appears, then run the command plink -v <user>@hg.sv.nongnu.org in a cmd.exe window and try to trace down the issue. In most cases, the reason will be a typo or a proxy or firewall issue.

more topics

Last modified: 2013-02-17 Visitor Counter