简体   繁体   English

Hg Git Pull 导致打开文件过多错误

[英]Hg Git Pull Causes Too Many Open Files Error

I have a Mercurial repository that tracks a git repository.我有一个跟踪 git 存储库的 Mercurial 存储库。 It was working ok on Windows 10. Now I moved it to a Mac as a directory, then ran hg reset -Ca just to clean it up.它在 Windows 10 上运行正常。现在我将它作为目录移动到 Mac,然后运行hg reset -Ca只是为了清理它。 Now I am trying to run hg pull It causes an error like this:现在我正在尝试运行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

I checked and it looks like I have latest versions of hg-git and dulwich我查了一下,看起来我有最新版本的hg-gitdulwich

dulwich (0.18.6)
hg-git (0.8.10)

Mercurial is also up to date Mercurial 也是最新的

% hg --version 
Mercurial Distributed SCM (version 4.5)

I checked version of Mercurial on Windows and it is 4.4.2 if that matters.我检查了 Windows 上的 Mercurial 版本,如果重要的话,它是4.4.2 I wonder if anyone had an issue like that and perhaps has a work around or fix.我想知道是否有人遇到过这样的问题,也许有解决方法或修复方法。

What does ulimit -n say on your Mac? ulimit -n在您的 Mac 上表示什么? This is the limit on the number of open files.这是对打开文件数的限制。 Try then running ulimit -n N for some larger N than what it was previously, and run the hg command again.然后尝试运行ulimit -n N以获得比以前更大的 N,然后再次运行 hg 命令。

You may want to put the ulimit -n N command in your ~/.bashrc to run it every time you log in, if you have this problem more than just this once.您可能希望将ulimit -n N命令放在您的~/.bashrc以便在您每次登录时运行它,如果您不止一次遇到此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM