Mercurial continues to return Error 400: invalid request

Anytime when I try to interact with the server, Mercurial returns "abort: HTTP Error 400: Bad Request". We do not use authentication, so this is not a problem. We have three more developers working on the same repo with the same version of Mercurial installed (2.2.3). They had no problems, so it seems to me that I am distorting something in the .hg folder or something like that. But I really don't know.

I was able to clone and work from the new directory just fine. However, after about 4 hours, it again began to repeat itself in the new catalog. The only thing I did during this period was fixation, traction and push. When I committed a few hours later and tried to pull, this is when I got the error again.

Here is the debug log for inbox (hg --debug --traceback incoming):

using http://myserver/myapp sending capabilities command comparing with http://myserver/myapp query 1; heads sending batch command searching for changes taking initial sample searching: 2 queries query 2; still undecided: 208, sample size is: 200 sending known command 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 472, in check File "mercurial\extensions.pyo", line 144, in wrap File "mercurial\util.pyo", line 472, in check File "hgext\mq.pyo", line 3528, in mqcommand File "mercurial\util.pyo", line 472, in check File "mercurial\commands.pyo", line 3894, 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 406, in open File "urllib2.pyo", line 519, in http_response File "urllib2.pyo", line 444, in error File "urllib2.pyo", line 378, in _call_chain File "urllib2.pyo", line 527, in http_error_default HTTPError: HTTP Error 400: Bad Request abort: HTTP Error 400: Bad Request 

As I said, I can make a clone, but if I try to run inbound, outbound, pull or push, I get this error.

+6
source share
2 answers

I managed to solve this problem by running

 hg rollback 

As soon as I ran this, it disabled my files (but saved the changes, so I could see the changed files in hg status). Then I was able to launch the incoming and delay. Then I retransmitted my code and popped it without a problem.

So, something must be damaged when I commit, I just don’t know why.

+6
source

I do not know what the problem is in this particular case. But we had another problem with the same result - input and shutdown commands with 400 Bad Request . So, here is a receipt for how to investigate a failure, in case hg -v --debug does not help.

Take Fiddler to capture and detect HTTP traffic. Then run the mercury query as follows:

 hg --config http_proxy.host=127.0.0.1:8888 pull 

The configuration causes the request to be redirected through Fiddler, which listens on port 8888. Then in Fiddler you can find the red 400 response and in the Inspectors panel to see whole messages, not just the code.

You can look here for detailed information about our problem, investigation and resolution.

+2
source

Source: https://habr.com/ru/post/923562/


All Articles