Page MenuHomePhorge

ArcanistRemoteRefInspector.php
No OneTemporary

ArcanistRemoteRefInspector.php

<?php
final class ArcanistRemoteRefInspector
extends ArcanistRefInspector {
public function getInspectFunctionName() {
return 'remote';
}
public function newInspectRef(array $argv) {
if (count($argv) !== 1) {
throw new PhutilArgumentUsageException(
pht(
'Expected exactly one argument to "remote(...)" with a '.
'remote name.'));
}
$remote_name = $argv[0];
$workflow = $this->getWorkflow();
$api = $workflow->getRepositoryAPI();
$ref = $api->newRemoteRefQuery()
->withNames(array($remote_name))
->executeOne();
if (!$ref) {
throw new PhutilArgumentUsageException(
pht(
'This working copy has no remote named "%s".',
$remote_name));
}
return $ref;
}
}

File Metadata

Mime Type
text/x-php
Expires
Jan 19 2025, 21:57 (6 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1114627
Default Alt Text
ArcanistRemoteRefInspector.php (790 B)

Event Timeline