Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96158059
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
Mon, Dec 23, 07:22
Size
898 B
Mime Type
text/x-php
Expires
Wed, Dec 25, 07:22 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23135855
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