我有一个大型(~700MB)的Mercurial存储库。我可以在没有更新的情况下克隆repo(并且它在Bitbucket上可以完全浏览,它可以托管)但是我无法将工作目录更新到最新的变更集,因为我收到以下错误:
... lot of getting [path] lines here
getting path/to/some/file.ext
abort: The system cannot find the file specified
[command returned code 255 Wed Jun 24 00:51:37 2015]
错误之前的最后一个文件实际存在于repo中(它在Bitbucket中也可见)。
我认为问题是由于路径太长,但即使克隆到驱动器根也会产生相同的效果。路径可能仍然太长但是" path / to / some / file.ext"只有60个字符。
使用traceback运行命令会产生以下结果:
Traceback (most recent call last):
File "mercurial\dispatch.pyo", line 160, in _runcatch
File "mercurial\dispatch.pyo", line 885, in _dispatch
File "mercurial\dispatch.pyo", line 646, in runcommand
File "mercurial\dispatch.pyo", line 976, in _runcommand
File "mercurial\dispatch.pyo", line 947, in checkargs
File "mercurial\dispatch.pyo", line 882, in <lambda>
File "mercurial\util.pyo", line 716, in check
File "mercurial\extensions.pyo", line 168, in closure
File "mercurial\util.pyo", line 716, in check
File "hgext\mq.pyo", line 3505, in mqcommand
File "mercurial\util.pyo", line 716, in check
File "mercurial\commands.pyo", line 6402, in update
File "mercurial\hg.pyo", line 535, in clean
File "mercurial\hg.pyo", line 520, in updaterepo
File "mercurial\merge.pyo", line 1140, in update
File "mercurial\merge.pyo", line 772, in applyupdates
File "mercurial\subrepo.pyo", line 246, in submerge
File "mercurial\context.pyo", line 252, in sub
File "mercurial\subrepo.pyo", line 341, in subrepo
File "mercurial\subrepo.pyo", line 1206, in __init__
File "mercurial\subrepo.pyo", line 1216, in _ensuregit
File "mercurial\subrepo.pyo", line 1294, in _gitnodir
File "subprocess.pyo", line 710, in __init__
File "subprocess.pyo", line 958, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified
有谁知道如何解决这个问题?
答案 0 :(得分:2)
解决了这个问题:Lazy Badger指出了正确的方向。问题是git可执行文件的路径没有添加到我的PATH
环境变量中。
使用Rapid Environment Editor将C:\Program Files (x86)\Git\bin\
(或您的系统上有git.exe的位置)添加到PATH
(我需要使用此工具作为我的PATH
超过1024 chars,所以使用setx
无效)系统变量解决了它。