@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove nonfunctional Mercurial "bundle2" capability filtering from SSH pathway

Summary:
Ref T13036. This code attempts to filter the "capabilities" message to remove "bundle2", but I think this has never worked.

Specifically, the //write// pathway is hooked, and "write" here means "client is writing a message to the server". However, the "capabilities" frame is part of the response, not part of the request. Thus, this code never fires, at least on recent versions of Mercurial.

Since I plan to support bundle2 and don't want to decode response frames, just get rid of this, assuming we'll achieve those goals.

I think this was just overlooked in D14241, which probably focused on the HTTP version. This code does (at least, potentially) do something for HTTP.

I'm leaving the actual "strip stuff" code in place for now since I think it's still used on the HTTP pathway.

Test Plan:
- Added debug logging, saw this code never hit even though `hg push --debug` shows the client believing bundle2 is supported.
- Logged both halves of the wire protocol and saw this come from the server, not the client.
- Ran the failing `hg push` of a 4MB file under hg 4.4.1, got the same error as before.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: cspeckmim

Maniphest Tasks: T13036

Differential Revision: https://secure.phabricator.com/D18855

+1 -8
+1 -8
src/applications/diffusion/ssh/DiffusionMercurialServeSSHWorkflow.php
··· 109 109 $this->didSeeWrite = true; 110 110 } 111 111 112 - $raw_message = $message['raw']; 113 - if ($command == 'capabilities') { 114 - $raw_message = DiffusionMercurialWireProtocol::filterBundle2Capability( 115 - $raw_message); 116 - } 117 - 118 - // If we're good, return the raw message data. 119 - return $raw_message; 112 + return $message['raw']; 120 113 } 121 114 122 115 protected function raiseWrongVCSException(