[2011-05-15 Added link to newer blog post]

[2011-03-04 Updates to make it more clear how I got pushing and pulling working]

NOTE: If you are getting started with Mercurial or TortoiseHg for the first time check out my more recent blog post first: http://blogs.msdn.com/b/saveenr/archive/2011/05/15/getting-started-with-tortoisehg-2-0-and-mercurial.aspx

 

Late in 2010 I wanted to try the Distributed Revision Control and began by picking Mercurial and starting a project on Google Code. I chose Mercurial instead of Git because from what I was reading at the time Mercurial seemed to be simpler and had better integration with Windows. That Windows integration for me took the form of using TortoiseHg. My experience has been very positive so far, and I am considering moving my CodePlex projects from TFS to Mercurial in the future.

A few days ago, a new version of TortoiseHg has been available and I wanted to share my experiences in upgrading from TortoiseHg 1.1.7 to TortoiseHg 2.0.

Downloading TortoiseHg 2.0

You can get download the binaries from here: http://tortoisehg.bitbucket.org/ . Please do be aware that you’ll need to download a specific installer depending on whether you have an x86 or x64 bit Windows OS.

SNAGHTML82e34e0

 

Installation Notes

I uninstalled TortoiseHg 1.1.7 first. For some reason it claimed I needed to reboot – irritating but OK. I rebooted. Then I installed TortoiseHg 2.0. Nothing surprising in the install. Screenshots below.

image

Install

image

 

image

 

image

image

 

image

 

image

 

Getting the Overlay Icons to Show

After installing, the overlay status icons we no longer visible in my repository. I rebooted and the icons then appeared. Later I realized that logging off and logging back on would fix this problem also.

image

 

The TortoiseHg 2.0 User Experience

Here are a few screenshots. Key things to notice is the new “TortoiseHg Workbench”

image

image

image

 

Overcoming Initial Problems in Pulling and Pushing

Of course, the first thing I tried was to click on the Pull icon in the Sync UI. Surprisingly this did not “Just Work”

Instead I received an error about a “nonumeric port”

% hg --repository D:\saveenr\code\google_code\saveenr pull --verbose https://saveenr@gmail.com:***@saveenr.googlecode.com/hg/
URLError: nonnumeric port: 'MYPASSWORD@saveenr.googlecode.com'
[command returned code 255 Fri Mar 04 01:35:17 2011]

For an experienced Mercurial user, this may be very obvious but for a novice such as myself this was rather confusing. After a few minutes of experimentation I resolved this by opening up the TortoiseHg Sync application …

image

You can see the error if I try to pull from here

image

SNAGHTMLcb02c

I first clicked on the save icon on the right side

image

This brought up the Save Path dialog.

SNAGHTMLeb598

I unchecked "Remove authentication data from url" which cause the dialog to change to this

SNAGHTML103b4b

And then I clicked Save which asked me to confirm. I clicked Yes.

SNAGHTML10eea2

Then I clicked on the Lock Icon to reveal the security settings

image

SNAGHTML11f0f3

I changed the setting the security by specifying my username as saveenr@gmail.com and entering my password and cliking Save.

SNAGHTMLe89c8

After these changes, pushes and pulls worked perfectly as you can see below.

SNAGHTML14a90b

Again, I'm sure there must be an easier way to do this – but it isn't clear to me at the moment.

 

Reference: Screenshots from TortoiseHg 1.1.7

To help you see the difference in the new version below are some screenshots from the previous version I had installed.

SNAGHTML8296f7f

SNAGHTML82b09f9

SNAGHTML82bd12e