Setup a Mercurial or Git Source Control server for Windows

Declan Sciolla-Lynch held a session at LS 12 AD102 about how to setup a RedMine Server for Mercurial.

I needed to see if there where a way to setup a Mercuial repository server that could run on windows it could probably run on other operating systems also but I haven’t tested any other.

If found scm-manager a java server that could handle Mercurial, Subversion and Git the best part of this server is that it has a .war file container to you could deploy it in websphere if you have this setup.

But it can also be used with Tomcat and that setup is what I will show you today.

Follow the Notes in 9 video 041 Source Control on how to setup the designer to use the Mercurial plugin.

1. Download  SCM-Manager it’s the scm-webapp-1.12.war that you want to download

2. Download Tomcat 7  click on the appropriate version for your server.

3. Unzip the tomcat zip file to a folder of your choice

4. Open up the Tomcat-users.xml  in the conf subfolder

here you add your admin user add the following rows

in the tomcat users section

This will add a user called admin with the password admin (select your own password)

Save the file

5. Open a commadn prompt goto the bin folder beneath the tomcat folder

Write service install  This will add tomcat to run as a service.

Start the service

6. Open up a webbrowser

The tomcat main page opens up

7. Click on

Scroll down to War file to deploy

8. Select browse and select scm-webapp-1.12.war and deploy

9. Scroll up scm should now be in the list of deployed applications

10. Click on /scm-webapp-1.11 this is now your url to the repository

11. You will now be asked to login to the SCM Manager

Use scmadmin and password scmadmin

12. Click on Repository Types in the Right Navigation beneath Config

13. All the Mercurial fields are blank when you look at them

Click on Start Configuration Wizard to configure them.

in the dialog box select Download and Install

When the configuration is done. Click on Save.

14. You need to restart Tomcat or SCM-Manager to get the Mercurial as an option when creating repositories.

15. Login to SCM-Manager again and create a user

16. Create a repository and select the type a mercurial.

Now You are done, just start to push your code the the repository.
Perhaps there is a way to convert the .war file to a OSGI package so we can drop the Tomcat server.


  1. Hi Fredrik. An excellent step by step tutorial/post. I will attempt this within the next few days and look forward to it.


  2. Hi Fredrik. I am going to reference your Blog post today and get Mercurial Installed on Windows. other than what you mentioned, and do I need anything else for a Full Source Control Management System?

    Cheers :)

    • Don’t think so if you just want to checkin code. But if you want all the other stuff that Redmine or BitBucket has like issue tracking or Wikis then
      you probably is better of with the solution that David Leedy showed the other day.

  3. you are my hero. great tutorial!

  4. Anton Gogolev

    There’s also HgLab ( ) – a source control management system for and Mercurial Server for Windows with push, pull and streaming capabilities, repository browser, Active Directory integration, ACLs and lots of other things.

Switch to our mobile site