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开发者_如何学JAVA 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.
I fixed this by removing the "/" at the end of the Path:
From
"C:\Program Files\TortoiseHg\"
to
"C:\Program Files\TortoiseHg"
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.
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.
精彩评论