【发布时间】:2015-12-08 05:19:15
【问题描述】:
将本地存储库推送到位于 Windows 7 网络共享上的主存储库时遇到错误。我在主存储库上添加了一个挂钩,以便在推送时执行“hg update”。当我从 TortoiseHg 中的本地存储库运行推送时,我在控制台中收到此错误:
Traceback (most recent call last):
File "c:\Python26\lib\site-packages\py2exe\boot_common.py", line 92, in <module>
ImportError: No module named linecache
Traceback (most recent call last):
File "<install zipextimporter>", line 1, in <module>
ImportError: No module named zipextimporter
Traceback (most recent call last):
File "hg", line 10, in <module>
ImportError: No module named os
warning: changegroup hook exited with status 255
推送发生,但未成功执行挂钩。此外,似乎我一直在命令行中运行“hg”命令时都会收到此错误,除非在 C:\Program Files\TortoiseHg 目录中运行它。我已将“C:\Program Files\TortoiseHg”放在PATH 环境变量中,但没有任何成功。系统是 Windows 7 x64。
一般来说,TortoiseHg 似乎可以工作,例如提交、更新、推送、拉取……但是像钩子这样的更精细的细节似乎不起作用。我只安装了 Tortoise 3.5.1,没有任何 Mercurial 或 Python。这是我安装它的地方:
http://bitbucket.org/tortoisehg/files/downloads/tortoisehg-3.5.1-x64.msi
http://tortoisehg.bitbucket.io/download/index.html
有人可以帮助我吗?我在 StackOverflow 上看到过类似的问题,但该人同时安装了 Mercurial 和 TortoiseHg。
那么,为什么我在命令行中运行 hg 时会出现这些错误?为什么从 TortoiseHg GUI 推送没有成功执行远程存储库上的钩子?
【问题讨论】:
标签: mercurial hook push tortoisehg