TortoiseHg 更新后 Mercurial 无法工作
我最近将 TortoiseHg 更新到 2.0.3(使用 Mercurial 1.8.2)。更新后,Mercurial 不再通过命令行 (Windows 7 x64) 运行,但可以通过 TortoiseHg GUI 运行。尝试通过命令行使用任何 Hg 命令会导致错误消息 'hg' 未被识别为内部或外部命令、可操作程序或批处理文件。'
我猜我需要对 TortoiseHg 或 Windows 7 中的设置进行一些更改,以便 Windows 能够识别 hg
命令,但我不确定更改是什么。我对使用 Hg 非常陌生 - 我几个月前安装了它(因此需要更新),但最近才开始使用它。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我通过删除路径末尾的“/”来修复此问题:
从
到
I fixed this by removing the "/" at the end of the Path:
From
to
TortoiseHg v2.XX 不再使用
hg
命令,而是尝试thg
。您的安装路径可能不同,但 thg.CMD 通常存在于:
C:/Program Files/TortoiseHg/bin/
如果您安装了独立于 TortoiseHg 的 Mercurial,您可能仍然可以访问
C :/Program Files/TortoiseHg/bin/
>hg 可执行文件,但大多数人只是安装 TortoiseHg 并获取 Mercurial 的关联副本,在这种情况下,您需要使用thg
命令。TortoiseHg v2.X.X no longer uses the
hg
command, instead trythg
.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 thethg
commands.我必须删除前导引号 - 包含的 PATH 变量:
并将其更改为
使其与 Red-Gate SQL 源代码管理一起使用。
I had to remove the leading quotation mark - the PATH variable contained:
and I changed it to
to make it work with Red-Gate SQL Source control.