TortoiseHg: ‘hg’ is not recognized as an internal or external command, operable program or batch file

buggydroid picture buggydroid · May 6, 2013 · Viewed 16k times · Source

I'm unable to find the command line tools in Mercurial-TortoiseHg version 2.7.2. I checked for hg.exe file and it is present at C:\Program Files\TortoiseHg path but whenever I try running the command it fails and throws the error :

‘hg’ is not recognized as an internal or external command, operable program or batch file.

I have also added it to the windows PATH= ; C:\Program Files\TortoiseHg.

Not sure what else to look for. Please help.

Answer

VonC picture VonC · May 6, 2013

Notes:

set PATH=%PATH%;C:\Program Files\TortoiseHg

(no space between ';' and 'C:\...')

As mentioned by the OP Sowmya Guru, if you modify the user environment variable, a restart (or at least a new DOS windows) is necessary.