Mercurial - Ways to resolve abort: error: '' after an hg in/pull

若如初见. 提交于 2019-12-13 21:34:46

问题


A perfectly good repository goes pear shaped after an unknown time.
A simple hg in fails with an error
abort: error: ''

Sometimes it just hangs for a few minutes without any output.

If I run with --verbose, same output.
If I run with --traceback, I get:

Traceback (most recent call last):
  File "mercurial\dispatch.pyo", line 88, in _runcatch
  File "mercurial\dispatch.pyo", line 740, in _dispatch
  File "mercurial\dispatch.pyo", line 514, in runcommand
  File "mercurial\dispatch.pyo", line 830, in _runcommand
  File "mercurial\dispatch.pyo", line 801, in checkargs
  File "mercurial\dispatch.pyo", line 737, in <lambda>
  File "mercurial\util.pyo", line 471, in check
  File "mercurial\commands.pyo", line 3901, in incoming
  File "mercurial\hg.pyo", line 513, in incoming
  File "mercurial\hg.pyo", line 472, in _incoming
  File "mercurial\bundlerepo.pyo", line 342, in getremotechanges
  File "mercurial\discovery.pyo", line 45, in findcommonincoming
  File "mercurial\setdiscovery.pyo", line 184, in findcommonheads
  File "mercurial\wireproto.pyo", line 116, in plain
  File "mercurial\wireproto.pyo", line 164, in _submitone
  File "mercurial\httppeer.pyo", line 170, in _call
  File "mercurial\httppeer.pyo", line 118, in _callstream
  File "urllib2.pyo", line 400, in open
  File "urllib2.pyo", line 418, in _open
  File "urllib2.pyo", line 378, in _call_chain
  File "mercurial\url.pyo", line 314, in http_open
  File "mercurial\keepalive.pyo", line 257, in do_open
URLError: <urlopen error ''>
abort: error: ''

No further details...
Does anyone have an idea how to debug this and resolve this? I end up cloning the parent repository again and deleting the old one :-(

EDIT: An update - while having these errors, we were working with two LAN networks that had a link between them. Some of the users where in an "old" network and others in the "new" one.
After everyone migrated to the new network, we stopped having these errors.

I hope this helps.


回答1:


I was receiving this error when there were some problems with bitbucket server (the one I am using as a code repository). And, eventually, this issue disappeared without my intervention with some time (~5-10 min or so...)

If you are using bitbucket, you can always check the status/response time of their API using the following link: http://status.bitbucket.org/




回答2:


Do you using https?

We had the very same problem. We could hg clone https://repository without issues. Unless anybody push anything to this (remote) repository, hg inc and hg pull works fine too. Once the remote repository was changed, hg inc either hg pull doesn't work anymore and result in the very same traceback (URLError: [Errno 10054] An existing connection was forcibly closed by the remote host). hg out either hg push works still perfectly.

Note: We changed the default path in .hg/hgrc to http://repository without any troubles regardless of which hg command we used. Of couse we also successfully tested using ssh.

So we went deeper and found something: the maximum allow header size in our loadbalancer which manage the https was too small. After we increased the value, everything works fine, also https :-)



来源:https://stackoverflow.com/questions/21529051/mercurial-ways-to-resolve-abort-error-after-an-hg-in-pull

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!