问题描述
我有一个大型(〜700MB)Mercurial存储库.我可以在不进行更新的情况下克隆存储库,而且也可以在托管的Bitbucket上完全浏览该存储库,但是由于出现以下错误,我无法将工作目录更新为最新的变更集:
I have a large (~700MB) Mercurial repository. I can clone the repo fine without updating (and also it's totally browsable on Bitbucket, where it's hosted) but I can't update the working directory to the latest changeset because I get the following error:
... 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]
错误之前的最后一个文件实际上存在于存储库中(在Bitbucket中也可见).
The last file before the error actually exists in the repo (it's visible in Bitbucket too).
我认为问题是因为路径太长,但是即使克隆到驱动器根也会产生相同的结果.路径可能仍然太长,但"path/to/some/file.ext"仅为60个字符.
I thought the issue was because of too long paths, but even cloning to a drive root yields the same. Paths could still be too long but "path/to/some/file.ext" is just 60 characters.
运行具有追溯功能的命令将产生以下结果:
Running the command with traceback yields this:
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
有人知道如何解决这个问题吗?
Anybody with an idea how to solve this?
推荐答案
解决了该问题:Lazy Badger指出了正确的方向.问题是git可执行文件的路径没有添加到我的PATH
环境变量中.
Solved the issue: Lazy Badger pointed into the right direction. The issue was that the path to the git executable wasn't added to my PATH
environment variable.
使用快速将C:\Program Files (x86)\Git\bin\
(或系统上有git.exe的位置)添加到PATH
环境变量编辑器(我需要使用此工具,因为我的PATH
超过了1024个字符,因此使用setx
无法正常工作)来解决系统变量问题.
Adding C:\Program Files (x86)\Git\bin\
(or where you have git.exe on your system) to PATH
with Rapid Environment Editor (I needed to use this tool as my PATH
was over 1024 chars, so using setx
wasn't working) to the System variables solved it.
这篇关于“中止:系统找不到指定的文件".在水星的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!