简体   繁体   中英

Mercurial hangs on 'hg pull'

I'm trying to pull changes from my working repository which I connected via VPN. But Mercurial (version 3.3.3) hangs on 'sending batch command' . I'm using Fedora 22 (4.0.6-300.fc22.x86_64 #1 SMP Tue Jun 23 13:58:53 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux).

When I tried

hg pull  --debug --profile --time --traceback

I got following output:

using http://user_name@remote-server:9000/repository
http auth: user user_name, password not set
sending capabilities command
http authorization required for http://remote-server:9000/repository
realm: RemoteServer sources authentication
user: user_name
password: 
http auth: user user_name, password ******
pulling from http://user_name@remote-server:9000/repository
preparing listkeys for "bookmarks"
sending listkeys command
preparing listkeys for "bookmarks"
sending listkeys command
query 1; heads
sending batch command
   CallCount    Recursive     Total(s)    Inline(s) module:lineno(function)
         671            0    265.1441    265.1441   <method 'recv' of '_socket.socket' objects>
           1            0      4.1296      4.1296   <method 'readline' of 'file' objects>
           3            0      0.0594      0.0594   <method 'connect' of '_socket.socket' objects>
         164          120      0.0120      0.0051   <__import__>
           1            0      0.0011      0.0003       httplib:67(<module>)
           1            0      0.0019      0.0002       urllib:23(<module>)
           1            0      0.0002      0.0002       mercurial.wireproto:8(<module>)
           1            0      0.0011      0.0002       logging:24(<module>)
           1            0      0.0013      0.0001       urlparse:29(<module>)
           1            0      0.0010      0.0010   mercurial.dagutil:131(_externalizeall)
          27            0    265.1451      0.0007   socket:410(readline)
         670            0    265.1441    265.1441       <method 'recv' of '_socket.socket' objects>
         693            0      0.0002      0.0002       <method 'write' of 'cStringIO.StringO' objects>
         668            0      0.0001      0.0001       <method 'find' of 'str' objects>
         643            0      0.0000      0.0000       <len>
          54            0      0.0000      0.0000       <method 'seek' of 'cStringIO.StringO' objects>
           2            0      0.0008      0.0006   collections:293(namedtuple)
           1            0      0.0000      0.0000       <<string>>:1(<module>)
           1            0      0.0000      0.0000       <<string>>:1(<module>)
           2            0      0.0000      0.0000       <method 'format' of 'str' objects>
          13            0      0.0000      0.0000       <all>
           2            0      0.0000      0.0000       <repr>
         527          481      0.0124      0.0005   mercurial.demandimport:103(__getattribute__)
         107           63      0.0122      0.0003       mercurial.demandimport:75(_load)
         214            0      0.0002      0.0002       mercurial.demandimport:103(__getattribute__)
         107            0      0.0000      0.0000       <getattr>
         236           11      0.0030      0.0004   mercurial.demandimport:112(_demandimport)
         172            0      0.0003      0.0003       mercurial.demandimport:62(__init__)
          65            5      0.0023      0.0000       mercurial.demandimport:45(_hgextimport)
         100            0      0.0000      0.0000       <getattr>
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 140, in _runcatch
    return _dispatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 863, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 624, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 947, in _runcommand
    return lsprofile(ui, checkargs, fp)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 888, in lsprofile
    return func()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 925, in checkargs
    return cmdfunc()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 860, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 711, in check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 5013, in pull
    bookmarks=opts.get('bookmark', ())).cgresult
  File "/usr/lib64/python2.7/site-packages/mercurial/exchange.py", line 878, in pull
    _pulldiscovery(pullop)
  File "/usr/lib64/python2.7/site-packages/mercurial/exchange.py", line 921, in _pulldiscovery
    step(pullop)
  File "/usr/lib64/python2.7/site-packages/mercurial/exchange.py", line 932, in _pulldiscoverychangegroup
    force=pullop.force)
  File "/usr/lib64/python2.7/site-packages/mercurial/discovery.py", line 46, in findcommonincoming
    abortwhenunrelated=not force)
  File "/usr/lib64/python2.7/site-packages/mercurial/setdiscovery.py", line 148, in findcommonheads
    batch.submit()
  File "/usr/lib64/python2.7/site-packages/mercurial/wireproto.py", line 123, in submit
    self._submitreq(req, rsp)
  File "/usr/lib64/python2.7/site-packages/mercurial/wireproto.py", line 125, in _submitreq
    encresults = self.remote._submitbatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/wireproto.py", line 225, in _submitbatch
    rsp = self._call("batch", cmds=';'.join(cmds))
  File "/usr/lib64/python2.7/site-packages/mercurial/httppeer.py", line 172, in _call
    fp = self._callstream(cmd, **args)
  File "/usr/lib64/python2.7/site-packages/mercurial/httppeer.py", line 119, in _callstream
    resp = self.urlopener.open(req)
  File "/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/site-packages/mercurial/url.py", line 324, in http_open
    return self.do_open(httpconnection, req)
  File "/usr/lib64/python2.7/site-packages/mercurial/keepalive.py", line 255, in do_open
    raise urllib2.URLError(err)
URLError: <urlopen error ''>
abort: error: ''
time: real 269.380 secs (user 0.020+0.000 sys 0.000+0.000)

If I try to pull changes from the same repository via VPN on Windows (8.1) - everything work fine.

解决方案很简单:降低MTU。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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