"abort: The system cannot find the file specified" 在 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中也可见)。

我认为这个问题是因为路径太长,但即使克隆到驱动器根目录也会产生同样的结果。路径可能仍然太长,但是";路径/to/some/file.ext";只有60个字符。

使用回溯运行命令会产生以下结果:

Traceback (most recent call last):
  File "mercurialdispatch.pyo", line 160, in _runcatch
  File "mercurialdispatch.pyo", line 885, in _dispatch
  File "mercurialdispatch.pyo", line 646, in runcommand
  File "mercurialdispatch.pyo", line 976, in _runcommand
  File "mercurialdispatch.pyo", line 947, in checkargs
  File "mercurialdispatch.pyo", line 882, in <lambda>
  File "mercurialutil.pyo", line 716, in check
  File "mercurialextensions.pyo", line 168, in closure
  File "mercurialutil.pyo", line 716, in check
  File "hgextmq.pyo", line 3505, in mqcommand
  File "mercurialutil.pyo", line 716, in check
  File "mercurialcommands.pyo", line 6402, in update
  File "mercurialhg.pyo", line 535, in clean
  File "mercurialhg.pyo", line 520, in updaterepo
  File "mercurialmerge.pyo", line 1140, in update
  File "mercurialmerge.pyo", line 772, in applyupdates
  File "mercurialsubrepo.pyo", line 246, in submerge
  File "mercurialcontext.pyo", line 252, in sub
  File "mercurialsubrepo.pyo", line 341, in subrepo
  File "mercurialsubrepo.pyo", line 1206, in __init__
  File "mercurialsubrepo.pyo", line 1216, in _ensuregit
  File "mercurialsubrepo.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

repo有git子repos(这些是GitHub上的公共repo)。hg git对我有效,否则,我可以从hg中提取并推送到git repos。

有人知道怎么解决这个问题吗?

解决了问题:懒惰獾指向了正确的方向。问题是git可执行文件的路径没有添加到我的PATH环境变量中。

使用Rapid Environment Editor将C:Program Files (x86)Gitbin(或系统上有git.exe的地方)添加到PATH(我需要使用此工具,因为我的PATH超过1024个字符,所以使用setx不起作用)到系统变量解决了这个问题。

相关内容

  • 没有找到相关文章

最新更新