Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98067267
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
Thu, Jan 9, 10:28
Size
898 B
Mime Type
text/x-php
Expires
Sat, Jan 11, 10:28 (2 d)
Engine
blob
Format
Raw Data
Handle
23506687
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