Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102206759
20160824.repohint.02.movebad.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, Feb 18, 06:39
Size
898 B
Mime Type
text/x-php
Expires
Thu, Feb 20, 06:39 (2 d)
Engine
blob
Format
Raw Data
Handle
24306410
Attached To
rPH Phabricator
20160824.repohint.02.movebad.php
View Options
<?php
$table
=
new
PhabricatorRepositoryCommit
();
$conn
=
$table
->
establishConnection
(
'w'
);
$rows
=
queryfx_all
(
$conn
,
'SELECT fullCommitName FROM repository_badcommit'
);
$viewer
=
PhabricatorUser
::
getOmnipotentUser
();
foreach
(
$rows
as
$row
)
{
$identifier
=
$row
[
'fullCommitName'
];
$commit
=
id
(
new
DiffusionCommitQuery
())
->
setViewer
(
$viewer
)
->
withIdentifiers
(
array
(
$identifier
))
->
executeOne
();
if
(!
$commit
)
{
echo
tsprintf
(
"%s
\n
"
,
pht
(
'Skipped hint for "%s", this is not a valid commit.'
,
$identifier
));
}
else
{
PhabricatorRepositoryCommitHint
::
updateHint
(
$commit
->
getRepository
()->
getPHID
(),
$commit
->
getCommitIdentifier
(),
null
,
PhabricatorRepositoryCommitHint
::
HINT_UNREADABLE
);
echo
tsprintf
(
"%s
\n
"
,
pht
(
'Updated commit hint for "%s".'
,
$identifier
));
}
}
Event Timeline
Log In to Comment