Don't implement SVN over HTTP

Summary:
Ref T2230. As far as I can tell, getting SVN working over HTTP is incredibly complicated. It's all DAV-based and doesn't appear to have any kind of binary we can just execute and pass requests through to. Don't support it for now.

  - Disable it in the UI.
  - Make sure all the error messages are reasonable.

Test Plan: Tried to HTTP an SVN repo. Tried to clone a Git repo with SVN, got a good error message.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2230

Differential Revision: https://secure.phabricator.com/D7562
This commit is contained in:
epriestley
2013-11-11 16:10:41 -08:00
parent c818e6e159
commit d4eca25774
3 changed files with 71 additions and 16 deletions

View File

@@ -126,6 +126,9 @@ final class DiffusionRepositoryEditHostingController
$request = $this->getRequest();
$user = $request->getUser();
$type = $repository->getVersionControlSystem();
$is_svn = ($type == PhabricatorRepositoryType::REPOSITORY_TYPE_SVN);
$v_http_mode = $repository->getDetail(
'serve-over-http',
PhabricatorRepository::SERVE_OFF);
@@ -146,9 +149,11 @@ final class DiffusionRepositoryEditHostingController
$type_http = PhabricatorRepositoryTransaction::TYPE_PROTOCOL_HTTP;
$type_ssh = PhabricatorRepositoryTransaction::TYPE_PROTOCOL_SSH;
$xactions[] = id(clone $template)
->setTransactionType($type_http)
->setNewValue($v_http_mode);
if (!$is_svn) {
$xactions[] = id(clone $template)
->setTransactionType($type_http)
->setNewValue($v_http_mode);
}
$xactions[] = id(clone $template)
->setTransactionType($type_ssh)
@@ -232,6 +237,18 @@ final class DiffusionRepositoryEditHostingController
PhabricatorRepository::SERVE_READWRITE),
$rw_message);
if ($is_svn) {
$http_control = id(new AphrontFormMarkupControl())
->setLabel(pht('HTTP'))
->setValue(
phutil_tag(
'em',
array(),
pht(
'Phabricator does not currently support HTTP access to '.
'Subversion repositories.')));
}
$form = id(new AphrontFormView())
->setUser($user)
->appendRemarkupInstructions(