2013-02-22 00:09:35 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
echo "Backfilling commit summaries...\n";
|
|
|
|
|
2014-02-06 19:33:54 +01:00
|
|
|
$table = new PhabricatorRepositoryCommit();
|
|
|
|
$conn_w = $table->establishConnection('w');
|
|
|
|
$commits = new LiskMigrationIterator($table);
|
2013-02-22 00:09:35 +01:00
|
|
|
foreach ($commits as $commit) {
|
|
|
|
echo 'Filling Commit #'.$commit->getID()."\n";
|
|
|
|
|
|
|
|
if (strlen($commit->getSummary())) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2013-02-22 01:25:01 +01:00
|
|
|
$data = $commit->loadOneRelative(
|
|
|
|
new PhabricatorRepositoryCommitData(),
|
|
|
|
'commitID');
|
2013-02-22 00:09:35 +01:00
|
|
|
|
|
|
|
if (!$data) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2014-02-06 19:33:54 +01:00
|
|
|
queryfx(
|
|
|
|
$conn_w,
|
|
|
|
'UPDATE %T SET summary = %s WHERE id = %d',
|
|
|
|
$commit->getTableName(),
|
|
|
|
$data->getSummary(),
|
|
|
|
$commit->getID());
|
2013-02-22 00:09:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
echo "Done.\n";
|