ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Computers & Software»
  • Computer Software

How to set up a Mercurial Project

Updated on April 13, 2012
Mercurial HG Logo
Mercurial HG Logo

What I need

You will need to have a few requirements in order to go through this guide.

  1. Bitbucket account - this will be covered in the guide
  2. Mercurial downloaded and installed - installation will not be covered.


Hello and Welcome to my Mercurial Tutorial. In this tutorial I will be explaining how to start up a project with Mercurial and Bitbucket. Mercurial is one of those things that wont mean much to those less tech savvy people. But Hopefully by the end of this tutorial you will be a master in creating and setting up a Mercurial project on your own!

What is Mercurial? is Source Control for your code.

What can it do for me? Have you ever worked on a document for school or work and lost it because there was nothing to back it up? Have you ever worked on a document with a group of people and then had to patch it together, and found out it was a hassle to get it to flow nicely? Mercurial does this all for you except for computer coding languages. If you have multiple people working on a similar project, it keeps track of the code and line spacing you have modified. It then seamlessly patches your code with someone else's additions once you decide to merge.

What is BitBbucket? is a company that will let you back up your code using SVN, Mercurial or Git. Which are all different types of source control programs. Bitbucket allows you to store your code on there privately or publicly and allows you to manage who can do what with your code.

Now that we have addressed a few questions, let us proceed.

Homepage | Source
Repository page/Overview account
Repository page/Overview account

Getting started with

First before we do anything else we need a Bitbucket account. Do so by going here for the free 5 users plan. You can have as many repositories as you want, but only 5 users on 1 private repository

Once you have created your account you will be brought to a blank page with absolutely nothing interesting on it what so ever. Get a feel for the site a little bit and I will go over a few of the things that I have highlighted in the picture on the right.

Green: This is your news feed. As you find people to collaborate with you may want to follow them to find out what new projects they are currently developing. This will keep you updated as things happen.

Cyan: This is where all your created repositories are shown. You can tell if they are private or not based on if the lock is showing in color. You can also tell if you are following your project updates based on the heart next to it. If the heart is showing, you will receive information in you news feed every time something has been done to your repository. There is also an add new repositories button. This can be accomplished by clicking on the green plus sign.

Purple: This is where your "currently participating" repositories are showed. These also show a heart next to them to show if you are following on their updates. There is also a padlock to show if the repository is private.

Creating a Project


Name: The name you would like to have on your repository.

Private: Make this repository private or public for others to view.

Repository Type: The type of Source control you are going to be using.

Language: The type of Coding language you will be using.

Issue Tracking: This is useful if you would like the public or your team to keep track of issues or future plans. Great for ticket help and status updates.

Wiki: Enables having a Wiki on your project. Great for explaining what your project does and how to operate it.

Description: Describe your project

Website: Company or project website

Getting started with a project on Bitbucket is really simple. If you look in the cyan highlighted area that was described in the last section, you will find a green plus sign. Click that.

After that you are brought to this page. This is where you can create a new repository or import some existing code. In this tutorial we are going to be creating a new repository from scratch and creating our project in the new repo.

Fill out the form and select the appropriate language for your project and click create repository.

The great thing about Bitbucket is they have tons of resources. They don't just leave you in the dark, there is a complete wiki just for people that need help getting started. You can find these resources here: Clicky

Clone: Clones the repository using the URL provided by Bitbucket

Create Repository Here: Creates a new repository with out the need of websites like Bitbucket. (Code will not be backed up on the server, but it will start the repository)

Explore Extension Settings: Gives you the settings for extensions

Global Settings: Global settings that will be applied to every repository that you access.

Update Icons: Updates the icons if you have changed the layout of them

URL and request info
URL and request info

Mercurial Hg

We are going to leave Bitbucket for now and move on the meat of this tutorial. For this next part you will need to download Mercurial Hg. You can do so by clicking this link here: Clicky. Click the big blue button on the right of the page and you will begin to download the appropriate package for your OS.

(Please note the rest of this tutorial is going to be focusing on Windows OS. I don't currently own a mac.)

Once the download is complete click on the package and install the program using all the pre-configured settings. Once this is complete it may request your computer to be restarted as this puts a menu option when you right click.

URLs for projects

Alright we have our project on Bitbucket! Take a break, this is a lot of reading. Go grab a sandwich and a glass of 2% milk. Once you have done that come back here and we will continue.

You ready then? Sweet!
This next section is about URLs. This is fairly simple to understand. The URL is highlighted in a cyan box. If you will notice there is two links, One called HTTPS and SSH. If you are on Windows You will be using HTTPS. This is the one I will be using for this guide.

The URL is made so that you can upload/download your project files from Bitbucket. When using the Clone option, the URL goes in the Source textbox.

TLDR (To the Point)

  1. Create an account on Bitbucket if you don't have one already.
  2. Create a project by clicking the green plus sign on the mid top right section of the page.
  3. Name the project and fill out all the inappropriate information, adding or removing all the features needed.
  4. Download and install Mercurial if not already installed.
  5. Find a folder you would like to have the project in.
  6. Right click in some white space so that you can find the Mercurial options under Tortoise HG
  7. Copy the link you get from the Bitbucket repository (be sure to get the HTTPS, You do not need "hg clone" just the
  8. Paste the URL into the source section of the Clone option.
  9. Click ok - it should ask you for your Bitbucket password and depending on the connection string it will ask for your Bitbucket username.


After you have cloned your project into a projects folder you should now be ready to start committing the code and updating to the server. If there is anything on here that is unclear and needs to be clarified. Please let me know. I will also answer any questions that I know how, on here if any come up. I hope this guide has been useful and be sure to check out my other guides by visiting these thinks:

Setting up a murmur/mumble server on windows 7
How to Customize the Options in Mumble (Basic)
5 Cool websites for the week


    0 of 8192 characters used
    Post Comment

    No comments yet.