1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-04-10 19:38:34 +02:00
phorge-phorge/src/applications/diffusion
Christopher Speck 99ee9357ef Updates for Mercurial's HTTP protocol
Summary:
While testing https://secure.phabricator.com/D21864 I ran into some issues getting mercurial HTTP access working. Using wireshark I confirmed that my local mercurial 6.4 was not including command arguments as HTTP headers but in the querystring.

I didn't dig too deep into understanding when/why this started happening. The protocol documents this in [[ https://repo.mercurial-scm.org/hg/file/tip/mercurial/helptext/internals/wireprotocol.txt | wireprotocol.txt ]].

>Command arguments can be sent multiple ways. The simplest is part of the URL query string using ``x-www-form-urlencoded`` encoding (see Python's ``urllib.urlencode()``. However, many servers impose length limitations on the URL. So this mechanism is typically only used if the server doesn't support other mechanisms.

Based on that either the mercurial on the server is really old (it's 6.1.1 tho) or maybe some other parsing/info passing in Phab's handling of the wire protocol is causing the client to downgrade the wire protocol support.

Cherry-picked from:

https://secure.phabricator.com/D21867

https://secure.phabricator.com/rP0b6e758978a9691bd5ad25db4aa4c4301640a9a9

Test Plan: Host mercurial repo using HTTP, test push/pull.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25471
2023-11-30 20:16:03 -05:00
..
application Show more in Application Detail and List view 2023-11-21 11:22:23 -07:00
capability Simplify the implementation of PhabricatorPolicyCapability subclasses 2014-07-25 08:25:42 +10:00
conduit Fix regression in DiffusionDiffQueryConduitAPIMethod 2023-10-10 07:16:15 +02:00
config Remove product literal strings in "pht()", part 17 2022-04-25 16:46:25 -07:00
controller Updates for Mercurial's HTTP protocol 2023-11-30 20:16:03 -05:00
data Fix a PHP 8.1 deprecated use of strlen with a NULL argument 2023-08-18 12:48:18 +02:00
document Update DiffusionDocumentRenderingEngine to cope with null code coverage in PHP 8.1 2023-07-05 08:44:24 +01:00
doorkeeper Modernize and clean up "PhabricatorAuditStatusConstants" 2021-03-10 09:21:55 -08:00
edge Diffusion commits: add some edge phrases about Revisions 2023-07-06 13:32:21 +02:00
editfield Assign RepositoryIdentity objects to commits 2018-05-31 07:28:23 -07:00
editor Remove product literal strings in "pht()", part 18 2022-04-25 16:46:25 -07:00
engine Fix strlen(null) PHP 8.1 error when pushing into a fresh repository 2023-07-28 18:22:55 +01:00
engineextension Correct minor "jump to symbol" behavior in Differential 2021-03-17 15:32:07 -07:00
exception Filter and reject "--config" and "--debugger" flags to Mercurial in any position 2017-11-10 08:42:07 -08:00
garbagecollector Support ID-based repository URIs, and canonicalize repository URIs 2016-02-18 09:56:28 -08:00
gitlfs Fix a missing getSSHUser() callsite 2018-01-31 15:34:12 -08:00
harbormaster Pass commit authorship information to Buildkite 2018-08-27 12:52:11 -07:00
herald Fix an issue where Herald may fail to extract content from an empty commit 2022-04-20 13:04:00 -07:00
identity Add a "--dry-run" flag to "bin/repository rebuild-identities" 2019-11-19 12:38:20 -08:00
management Fix PHP 8.1 "strlen(null)" and "preg_match()" exceptions which block repository creation 2023-05-19 17:18:37 +02:00
panel Remove product literal strings in "pht()", part 18 2022-04-25 16:46:25 -07:00
protocol Remove product literal strings in "pht()", part 18 2022-04-25 16:46:25 -07:00
query Fix typo in DiffusionLowLevelGitRefQuery 2023-11-13 08:50:41 +08:00
ref Allow repository service lookups to return an ordered list of service refs 2019-09-03 10:05:40 -07:00
relationships Convert all standard relationship-editing actions to modern Relationships code 2016-06-29 11:24:52 -07:00
remarkup Add a "{src ...}" Remarkup rule to provide a more flexible way to reference source files in Diffusion 2019-05-21 13:12:28 -07:00
request Fix a PHP 8.1 deprecated use of preg_match with a NULL argument 2023-08-17 10:16:50 +02:00
response Implement a Git LFS server which supports no operations 2016-03-17 08:08:43 -07:00
searchfield Assign RepositoryIdentity objects to commits 2018-05-31 07:28:23 -07:00
ssh Remove product literal strings in "pht()", part 18 2022-04-25 16:46:25 -07:00
symbol Provide character position information to symbol queries 2018-01-26 13:01:57 -08:00
typeahead Implement ferret engine in typeahead datasource query for repos 2023-09-04 09:48:41 +02:00
view Fix PHP 8.1 strlen(null) in DiffusionView linkBrowse() 2023-07-12 13:38:23 +01:00
worker When updating revisions in responset to commits, use the omnipotent viewer to pull diffs 2021-03-01 11:11:34 -08:00
xaction Modernize and clean up "PhabricatorAuditStatusConstants" 2021-03-10 09:21:55 -08:00
DiffusionCommitAuditStatus.php Enrich "diffusion.commit.search" with identity, status, and message information 2018-09-12 12:45:44 -07:00
DiffusionLintSaveRunner.php Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00