Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1669239
20130219.commitsummarymig.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
663 B
Referenced Files
None
Subscribers
None
20130219.commitsummarymig.php
View Options
<?php
echo
pht
(
'Backfilling commit summaries...'
).
"
\n
"
;
$table
=
new
PhabricatorRepositoryCommit
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
$commits
=
new
LiskMigrationIterator
(
$table
);
foreach
(
$commits
as
$commit
)
{
echo
pht
(
'Filling Commit #%d'
,
$commit
->
getID
()).
"
\n
"
;
if
(
strlen
(
$commit
->
getSummary
()))
{
continue
;
}
$data
=
id
(
new
PhabricatorRepositoryCommitData
())->
loadOneWhere
(
'commitID = %d'
,
$commit
->
getID
());
if
(!
$data
)
{
continue
;
}
queryfx
(
$conn_w
,
'UPDATE %T SET summary = %s WHERE id = %d'
,
$commit
->
getTableName
(),
$data
->
getSummary
(),
$commit
->
getID
());
}
echo
pht
(
'Done.'
).
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jul 17, 5:58 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
372798
Default Alt Text
20130219.commitsummarymig.php (663 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment