Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 267
Travis Northcutt Avatar asked Apr 16 '11 13:04

Travis Northcutt


2 Answers

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

From

"C:\Program Files\TortoiseHg\"

to

"C:\Program Files\TortoiseHg"
like image 52
Thet Avatar answered Nov 15 '22 15:11

Thet


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.

like image 7
dls Avatar answered Nov 15 '22 14:11

dls