Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F119979217
PhabricatorRepositoryManagementRefsWorkflow.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 1, 00:37
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Jul 3, 00:37 (2 d)
Engine
blob
Format
Raw Data
Handle
27120703
Attached To
rPH Phabricator
PhabricatorRepositoryManagementRefsWorkflow.php
View Options
<?php
final
class
PhabricatorRepositoryManagementRefsWorkflow
extends
PhabricatorRepositoryManagementWorkflow
{
protected
function
didConstruct
()
{
$this
->
setName
(
'refs'
)
->
setExamples
(
'**refs** [__options__] __repository__ ...'
)
->
setSynopsis
(
'Update refs in __repository__, named by callsign.'
)
->
setArguments
(
array
(
array
(
'name'
=>
'verbose'
,
'help'
=>
'Show additional debugging information.'
,
),
array
(
'name'
=>
'repos'
,
'wildcard'
=>
true
,
),
));
}
public
function
execute
(
PhutilArgumentParser
$args
)
{
$repos
=
$this
->
loadRepositories
(
$args
,
'repos'
);
if
(!
$repos
)
{
throw
new
PhutilArgumentUsageException
(
pht
(
'Specify one or more repositories to update refs for, '
.
'by callsign.'
));
}
$console
=
PhutilConsole
::
getConsole
();
foreach
(
$repos
as
$repo
)
{
$console
->
writeOut
(
"Updating refs in '%s'...
\n
"
,
$repo
->
getCallsign
());
$engine
=
id
(
new
PhabricatorRepositoryRefEngine
())
->
setRepository
(
$repo
)
->
setVerbose
(
$args
->
getArg
(
'verbose'
))
->
updateRefs
();
}
$console
->
writeOut
(
"Done.
\n
"
);
return
0
;
}
}
Event Timeline
Log In to Comment