Page MenuHomePhabricator

D21544.id51282.diff
No OneTemporary

D21544.id51282.diff

diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementPullWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementPullWorkflow.php
--- a/src/applications/repository/management/PhabricatorRepositoryManagementPullWorkflow.php
+++ b/src/applications/repository/management/PhabricatorRepositoryManagementPullWorkflow.php
@@ -14,6 +14,12 @@
'name' => 'verbose',
'help' => pht('Show additional debugging information.'),
),
+ array(
+ 'name' => 'ignore-locality',
+ 'help' => pht(
+ 'Pull even if the repository should not be present on this '.
+ 'host according to repository cluster configuration.'),
+ ),
array(
'name' => 'repos',
'wildcard' => true,
@@ -22,8 +28,9 @@
}
public function execute(PhutilArgumentParser $args) {
- $repos = $this->loadLocalRepositories($args, 'repos');
+ $ignore_locality = (bool)$args->getArg('ignore-locality');
+ $repos = $this->loadLocalRepositories($args, 'repos', $ignore_locality);
if (!$repos) {
throw new PhutilArgumentUsageException(
pht('Specify one or more repositories to pull.'));
diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementWorkflow.php
--- a/src/applications/repository/management/PhabricatorRepositoryManagementWorkflow.php
+++ b/src/applications/repository/management/PhabricatorRepositoryManagementWorkflow.php
@@ -35,13 +35,18 @@
protected function loadLocalRepositories(
PhutilArgumentParser $args,
- $param) {
+ $param,
+ $ignore_locality = false) {
$repositories = $this->loadRepositories($args, $param);
if (!$repositories) {
return $repositories;
}
+ if ($ignore_locality) {
+ return $repositories;
+ }
+
$device = AlmanacKeys::getLiveDevice();
$viewer = $this->getViewer();

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 9:06 AM (3 h, 11 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6774190
Default Alt Text
D21544.id51282.diff (2 KB)

Event Timeline