Create project in Mercurial SCM

A new project in the Mercurial SCM is created using the init command which is not supported over HTTP.

Using remote desktop:

1. Initialize the new project in the c:\mercurial folder.
Open command window
cd \mercurial
hg init [newProjectName] e.g. hg init CameraBot

2. Configure
In the .hg folder of the new project create (or copy it from another project) a file named hgrc with this content:
[web]
allow_push = *
push_ssl = false
description = 2013 camera testing

Add a line to htdocs\mercurial\hgweb.config:
someprojectname = c:/mercurial/[newProjectName] e.g. camerabot = c:/mercurial/CameraBot

3. Add user if necessary.
In the command window generate a password hash.
htpasswd [passwordFileName] [userName] e.g. htpasswd hgusers cititzenKane
You will be prompted to enter a password twice then a userName:passwordHash will be appended to the indicated file.

Close the remote desktop.

4. Clone http://firebears.org/hg/someprojectname to a local repository. After adding and editing files commit to the local repository open the TortoiseHg Synchronize dialog and push changes to the remote repository.

 

Posted in Programming Tagged with:

Leave a Reply

Your email address will not be published. Required fields are marked *

*