mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-11 07:11:04 +01:00
Support Mercurial "protocaps" wire command
Summary: Ref T13187. See PHI834. Mercurial has somewhat-recently (changeset is from Jan 2018) introduced a new "protocaps" command, that appears in Mercurial 4.7 and possibly before then. We must explicitly enumerate all protocol commands because you can't decode the protocol without knowing how many arguments the command expects, so enumerate it. (Also fix an issue where the related error message had an extra apostrophe.) Test Plan: - Ran `hg clone ...` with client and server on Mercurial 4.7. - Before: fatal on unknown "protocaps" command. - Midway: better typography in error message. - After: clean clone. Reviewers: amckinley Maniphest Tasks: T13187 Differential Revision: https://secure.phabricator.com/D19596
This commit is contained in:
parent
75a5dd8d8c
commit
7ef2bb1b56
1 changed files with 6 additions and 1 deletions
|
@ -23,12 +23,16 @@ final class DiffusionMercurialWireProtocol extends Phobject {
|
|||
'listkeys' => array('namespace'),
|
||||
'lookup' => array('key'),
|
||||
'pushkey' => array('namespace', 'key', 'old', 'new'),
|
||||
'protocaps' => array('caps'),
|
||||
'stream_out' => array(''),
|
||||
'unbundle' => array('heads'),
|
||||
);
|
||||
|
||||
if (!isset($commands[$command])) {
|
||||
throw new Exception(pht("Unknown Mercurial command '%s!", $command));
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Unknown Mercurial command "%s"!',
|
||||
$command));
|
||||
}
|
||||
|
||||
return $commands[$command];
|
||||
|
@ -49,6 +53,7 @@ final class DiffusionMercurialWireProtocol extends Phobject {
|
|||
'known' => true,
|
||||
'listkeys' => true,
|
||||
'lookup' => true,
|
||||
'protocaps' => true,
|
||||
'stream_out' => true,
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue