2013-02-22 00:09:35 +01:00
|
|
|
<?php
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Backfilling commit summaries...')."\n";
|
2013-02-22 00:09:35 +01:00
|
|
|
|
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) {
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Filling Commit #%d', $commit->getID())."\n";
|
2013-02-22 00:09:35 +01:00
|
|
|
|
|
|
|
if (strlen($commit->getSummary())) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2018-12-13 00:47:17 +01:00
|
|
|
$data = id(new PhabricatorRepositoryCommitData())->loadOneWhere(
|
|
|
|
'commitID = %d',
|
|
|
|
$commit->getID());
|
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
|
|
|
}
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Done.')."\n";
|