Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F68481397
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
Thu, Jun 27, 14:34
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Jun 29, 14:34 (2 d)
Engine
blob
Format
Raw Data
Handle
18541958
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