我有一个跟踪git存储库的Mercurial存储库。它在Windows 10上运行正常。现在我将它作为目录移动到Mac,然后运行hg reset -Ca
只是为了清理它。现在我正在尝试运行hg pull
它会导致如下错误:
% hg --traceback --verbose pull 255 ↵
pulling from git+https://someserver/somerepo.git
Traceback (most recent call last):
File "/Users/user/.pyenv/versions/2.7.14/lib/python2.7/site-packages/mercurial/scmutil.py", line 154, in callcatch
File "/Users/user/.pyenv/versions/2.7.14/lib/python2.7/site-packages/mercurial/dispatch.py", line 314, in _runcatchfunc
.....
File "/Users/user/.pyenv/versions/2.7.14/lib/python2.7/site-packages/dulwich/pack.py", line 1004, in __init__
File "/Users/user/.pyenv/versions/2.7.14/lib/python2.7/site-packages/dulwich/file.py", line 90, in GitFile
IOError: [Errno 24] Too many open files: '/Users/user/Projects/somerepo/.hg/git/objects/pack/pack-c03bf69ae597535d876f0dd30ddd6458f2c3f1ff.pack'
abort: Too many open files: /Users/user/Projects/somerepo/.hg/git/objects/pack/pack-c03bf69ae597535d876f0dd30ddd6458f2c3f1ff.pack
我查了一下,看起来我有最新版本的hg-git
和dulwich
dulwich (0.18.6)
hg-git (0.8.10)
Mercurial也是最新的
% hg --version
Mercurial Distributed SCM (version 4.5)
我在Windows上检查了Mercurial的版本,如果重要的话,它是4.4.2
。我想知道是否有人有这样的问题,也许有解决方法或修复。
答案 0 :(得分:3)
ulimit -n
在您的Mac上说了些什么?这是打开文件数量的限制。然后尝试运行ulimit N
以获得比之前更大的N,并再次运行hg命令。
如果您遇到此问题不止一次,您可能希望在每次登录时都将ulimit N
命令放在~/.bashrc
中运行它。