title: Hg Git Pull Causes Too Many Open Files Error
body: <p>I have a Mercurial repository that tracks a git repository. It was working ok on Windows 10. Now I moved it to a Mac as a directory, then ran <code>hg reset -Ca</code> just to clean it up. Now I am trying to run <code>hg pull</code> It causes an error like this:</p>
  
  <pre><code>% 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
  </code></pre>
  
  <p>I checked and it looks like I have latest versions of <code>hg-git</code> and <code>dulwich</code></p>
  
  <pre><code>dulwich (0.18.6)
  hg-git (0.8.10)
  </code></pre>
  
  <p>Mercurial is also up to date </p>
  
  <pre><code>% hg --version 
  Mercurial Distributed SCM (version 4.5)
  </code></pre>
  
  <p>I checked version of Mercurial on Windows and it is <code>4.4.2</code> if that matters. I wonder if anyone had an issue like that and perhaps has a work around or fix.</p>