Travis Northcutt
Travis Northcutt

Reputation: 25036

Mercurial not working after TortoiseHg update

I recently updated TortoiseHg to 2.0.3 (with Mercurial 1.8.2). After updating, Mercurial no longer works via the command line (Windows 7 x64), but does work via the TortoiseHg GUI. Trying to use any Hg commands via the command line results in the error message 'hg' is not recognized as an internal or external command, operable program or batch file.'

I'm guessing I need to make some change to a setting in TortoiseHg or Windows 7 so that Windows will recognize hg commands, but I'm not sure what that change is. I am very new to using Hg - I installed it a few months ago (thus the need for an update), but only recently started using it.

Upvotes: 12

Views: 5264

Answers (3)

dtucker
dtucker

Reputation: 11

I had to remove the leading quotation mark - the PATH variable contained:

...;"C:\Program Files\TortoiseHg

and I changed it to

...;C:\Program Files\TortoiseHg

to make it work with Red-Gate SQL Source control.

Upvotes: 1

Thet
Thet

Reputation: 101

I fixed this by removing the "/" at the end of the Path:

From

"C:\Program Files\TortoiseHg\"

to

"C:\Program Files\TortoiseHg"

Upvotes: 10

dls
dls

Reputation: 4146

TortoiseHg v2.X.X no longer uses the hg command, instead try thg.

Your install path might be different, but typically thg.CMD exists at:

C:/Program Files/TortoiseHg/bin/

If you've installed Mercurial independent of TortoiseHg you may still have access to the hg executable, but most people just install TortoiseHg and take the associated copy of Mercurial, in which case you would need to use the thg commands.

Upvotes: 7

Related Questions