Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2895737
ArcanistRemoteRefInspector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
790 B
Referenced Files
None
Subscribers
None
ArcanistRemoteRefInspector.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment