Mecurial / Tortoisehg: Setting up a Source Control Repository on HTTP


Install the following

One this is installed we will:

  • Create a Repository where our source code will sit.
  • Create a clone where our working location is
    STEP 1: Create the Repository

So, the first step is to allocate a folder for the repository:

My repository folder is called:


We will then right click the folder and select Create Repository:


We just confirm the destination as the same place:


Cool, now we need to publish the repository to the web.

Right click the folder and go to repository explorer.


Then in the explorer go to Tools->Settings and configure HTTP/HTTPS and port number to listen on:


Once this is done, click the Server Button!


You will see a window open that is listening on this new port:


That’s it we done.

We can also updated the .hgignore file to ignore checking in these files:


# Ignore file for Visual Studio 2008

# use glob syntax
syntax: glob

# Ignore Visual Studio 2008 files


Next, you need to activate the files in the repository, by adding them, if you got existing files already in the folder!



Once this is done, you COMMIT them to the repository:


Confirm all the files and we done on the Master repository side:)


Double check all files have a nice green tick:


If you go back to the repository explorer the history should now be there after the commit.


    STEP 1: Clone the Repository from a developer machine


Note: if you have the master repository, you still need to clone it and use the clone, never use the repository directly!)

To use the repository, you need to create another folder on ALL users machines that will use the source control. To do this, they will CLONE the repository.

So if you are the only user of the project, you will STILL need to clone it, that means if your computer is the repository and you want to use the source control, you must also clone it.

So i created a new folder called PhotoRA, which will be my clone. I right click the folder and select Clone:


Then specify the web URL.


Once done, it will automatically fill the folder and you can now use Visual Studio and start coding.


We can test this, by opening the solution editing the file and committing it to the repository.

I went an updated the web.config file in my clone repository using Visual Studio. Now I right click the clone folder and commit.


Next I right click my clone folder and select repository explorer and I see the history, I can now PUSH it up to the main repository.


You can see all the chit chat in the HTTP Server Log:


Never edit files directly in the MAIN repository!


Repeat STEP 2 for ALL developers using your repository πŸ™‚

That’s it πŸ™‚


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s