Page MenuHomePhabricator

D14250.diff
No OneTemporary

D14250.diff

diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementEditWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementEditWorkflow.php
--- a/src/applications/repository/management/PhabricatorRepositoryManagementEditWorkflow.php
+++ b/src/applications/repository/management/PhabricatorRepositoryManagementEditWorkflow.php
@@ -7,7 +7,10 @@
$this
->setName('edit')
->setExamples('**edit** --as __username__ __repository__ ...')
- ->setSynopsis(pht('Edit __repository__, named by callsign.'))
+ ->setSynopsis(
+ pht(
+ 'Edit __repository__, named by callsign '.
+ '(will eventually be deprecated by Conduit).'))
->setArguments(
array(
array(
@@ -24,6 +27,16 @@
'param' => 'path',
'help' => pht('Edit the local path.'),
),
+ array(
+ 'name' => 'serve-http',
+ 'param' => 'string',
+ 'help' => pht('Edit the http serving policy.'),
+ ),
+ array(
+ 'name' => 'serve-ssh',
+ 'param' => 'string',
+ 'help' => pht('Edit the ssh serving policy.'),
+ ),
));
}
@@ -68,12 +81,33 @@
$xactions = array();
$type_local_path = PhabricatorRepositoryTransaction::TYPE_LOCAL_PATH;
+ $type_protocol_http =
+ PhabricatorRepositoryTransaction::TYPE_PROTOCOL_HTTP;
+ $type_protocol_ssh = PhabricatorRepositoryTransaction::TYPE_PROTOCOL_SSH;
+ $allowed_serve_modes = array(
+ PhabricatorRepository::SERVE_OFF,
+ PhabricatorRepository::SERVE_READONLY,
+ PhabricatorRepository::SERVE_READWRITE,
+ );
if ($args->getArg('local-path')) {
$xactions[] = id(new PhabricatorRepositoryTransaction())
->setTransactionType($type_local_path)
->setNewValue($args->getArg('local-path'));
}
+ $serve_http = $args->getArg('serve-http');
+ if ($serve_http && in_array($serve_http, $allowed_serve_modes)) {
+ $xactions[] = id(new PhabricatorRepositoryTransaction())
+ ->setTransactionType($type_protocol_http)
+ ->setNewValue($serve_http);
+ }
+ $serve_ssh = $args->getArg('serve-ssh');
+ if ($serve_ssh && in_array($serve_ssh, $allowed_serve_modes)) {
+ $xactions[] = id(new PhabricatorRepositoryTransaction())
+ ->setTransactionType($type_protocol_ssh)
+ ->setNewValue($serve_ssh);
+ }
+
if (!$xactions) {
throw new PhutilArgumentUsageException(

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 26, 9:16 AM (3 w, 15 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7657275
Default Alt Text
D14250.diff (2 KB)

Event Timeline