Mercurial does not work over http


Observed Behavior:
hg push results in Error 500

Expected Behavior:
Let me push stuff

Phabricator Version:
phabricator 82bfb9817920bbd6f75d27cbbf4555e310b826b0 (Thu, Jan 11)
arcanist 3d06bd4c568c844cf9b42d7c0671a2698cc03899 (Tue, Dec 26)
phutil 59642f23682296417575dc562eeaf4d7f4574651 (Nov 30 2017)

Reproduction Steps:
Setup everything for http-push to mercurial repo.
Try to push.
[2018-01-11 23:39:24] EXCEPTION: (Exception) Expected nonempty ‘cmds’ specification! at [/src/applications/diffusion/protocol/DiffusionMercurialWireProtocol.php:68]

DiffusionMercurialWireProtocol.php:63 is False,
DiffusionServeController.php:479 is null,
$this->getMercurialArguments() assumes “Mercurial sends arguments in HTTP headers”,
but it does not ( at least in this case. ) Arguments only in query string, but this is ignored.

Request as per apache forensiclog:
+26830:5a57eb1a:3|GET /source/testrepo2/?cmd=batch&cmds=heads+%253Bknown+nodes%253D97d666aced895d17e1a9d3e0e8a367b4b42ee619 HTTP/1.1|Accept-Encoding:identity|accept:application/mercurial-0.1|authorization:Basic bWljaGFlbDpvdHRvMjI=|host:XXXX|user-agent:mercurial/proto-1.0 (Mercurial 4.3.3)

I tried this with mercurial 3.6.2, 4.0 and 4.3.3 on FreeBSD and 4.1.3 on Windows.


+1 to this.

Some research I done on the topic: