Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122144330
PhabricatorStorageManagementStatusWorkflow.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
Wed, Jul 16, 03:11
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Jul 18, 03:11 (2 d)
Engine
blob
Format
Raw Data
Handle
27440399
Attached To
rPH Phabricator
PhabricatorStorageManagementStatusWorkflow.php
View Options
<?php
final
class
PhabricatorStorageManagementStatusWorkflow
extends
PhabricatorStorageManagementWorkflow
{
public
function
didConstruct
()
{
$this
->
setName
(
'status'
)
->
setExamples
(
'**status** [__options__]'
)
->
setSynopsis
(
'Show patch application status.'
);
}
public
function
execute
(
PhutilArgumentParser
$args
)
{
$api
=
$this
->
getAPI
();
$patches
=
$this
->
getPatches
();
$applied
=
$api
->
getAppliedPatches
();
if
(
$applied
===
null
)
{
echo
phutil_console_format
(
"**Database Not Initialized**: Run **storage upgrade** to "
.
"initialize.
\n
"
);
return
1
;
}
$len
=
0
;
foreach
(
$patches
as
$patch
)
{
$len
=
max
(
$len
,
strlen
(
$patch
->
getFullKey
()));
}
foreach
(
$patches
as
$patch
)
{
printf
(
"% -"
.(
$len
+
2
).
"s "
.
"%-"
.
strlen
(
'Not Applied'
).
"s "
.
"%-4s "
.
"%s
\n
"
,
$patch
->
getFullKey
(),
in_array
(
$patch
->
getFullKey
(),
$applied
)
?
'Applied'
:
'Not Applied'
,
$patch
->
getType
(),
$patch
->
getName
());
}
return
0
;
}
}
Event Timeline
Log In to Comment