"abort: The system cannot find the file specified" 在 Mercurial 中
"abort: The system cannot find the file specified" in Mercurial
我有一个大型 (~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 (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
有人知道如何解决这个问题吗?
问题已解决:Lazy Badger 指出了正确的方向。问题是 git 可执行文件的路径没有添加到我的 PATH
环境变量中。
使用 Rapid Environment Editor 将 C:\Program Files (x86)\Git\bin\
(或者您的系统上有 git.exe 的位置)添加到 PATH
(我需要使用此工具作为我的 PATH
超过 1024 个字符,因此使用 setx
无效)系统变量解决了它。
我有一个大型 (~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 (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
有人知道如何解决这个问题吗?
问题已解决:Lazy Badger 指出了正确的方向。问题是 git 可执行文件的路径没有添加到我的 PATH
环境变量中。
使用 Rapid Environment Editor 将 C:\Program Files (x86)\Git\bin\
(或者您的系统上有 git.exe 的位置)添加到 PATH
(我需要使用此工具作为我的 PATH
超过 1024 个字符,因此使用 setx
无效)系统变量解决了它。