I got some situation as in initially description of T12521 (https://secure.phabricator.com/T12521) bug:
"abort: HTTP Error 500: Error 1: ** unknown exception encountered, please report by visiting"
and similar trace listing.
After some digging to this problem I found next things:
- Phabricator’s exceptions rise because server can’t find hg’s commands in HTTP header.
- Mercurial, when working with Phabricator send this command in GET request in form 'cmd=batch&cmds=heads…'
and that cause Phabricator to rise exceptions because (1)
- Mercurial, when working with standalone Mercurial server, generate commands, that expect Phabricator, in HTTP
header in form “HTTP_X_HGARG_”
- Responses on ‘capabilities’ command between Phabricator and standalone server differ with small part:
lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN
lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 largefiles=serve
Param, that break all is httpheader=1024
If it forcibly added to Phabricator answer on capability req, than all start work as a charm.
It tested with versions 3.8.4, 4.3 and 4.3.1 of Mercurial client.