我有一个Mercurial版本库,用来追踪一个git版本库。在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
,不知道这是否有影响。我想知道是否有人遇到过类似的问题,或者可能有解决方法。
sysctl
检查了打开文件的数量。sysctl kern.maxfiles
返回kern.maxfiles: 49152
,sysctl kern.maxfilesperproc
返回kern.maxfilesperproc: 24576
。 使用ulimit -n
返回 256。调用ulimit -n 512
解决了问题。 - EvgeniySharapov