mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Support Mercurial in test_connection.php
Summary: Add Mercurial support to this script. Test Plan: Connected to public and private Bitbucket mercurial repos, successfully (with valid credentials) and unsuccessfully (without valid credentials). Reviewers: Makinde, jungejason, nh, tuomaspelkonen, aran Reviewed By: jungejason CC: aran, jungejason Differential Revision: 938
This commit is contained in:
parent
cd4f954b99
commit
8396c879b1
1 changed files with 10 additions and 0 deletions
|
@ -73,6 +73,16 @@ switch ($vcs) {
|
|||
$repository->getRemoteURI(),
|
||||
'just-testing');
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
||||
// TODO: 'hg id' doesn't support --insecure so we can't tell it not to
|
||||
// spew. If 'hg id' eventually supports --insecure, consider using it.
|
||||
echo "(It is safe to ignore any 'certificate with fingerprint ... not ".
|
||||
"verified' warnings, although you may want to configure Mercurial ".
|
||||
"to recognize the server's fingerprint/certificate.)\n";
|
||||
$err = $repository->passthruRemoteCommand(
|
||||
'id --rev tip %s',
|
||||
$repository->getRemoteURI());
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Unsupported repository type.");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue