mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-02 19:52:44 +01:00
36e2d02d6e
Summary: `pht`ize a whole bunch of strings in rP. Test Plan: Intense eyeballing. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: hach-que, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12797
35 lines
823 B
PHP
35 lines
823 B
PHP
<?php
|
|
|
|
$table = new DifferentialRevision();
|
|
$table->openTransaction();
|
|
$table->beginReadLocking();
|
|
$conn_w = $table->establishConnection('w');
|
|
|
|
echo pht('Migrating revisions')."\n";
|
|
do {
|
|
$revisions = $table->loadAllWhere('branchName IS NULL LIMIT 1000');
|
|
|
|
foreach ($revisions as $revision) {
|
|
echo '.';
|
|
|
|
$diff = $revision->loadActiveDiff();
|
|
if (!$diff) {
|
|
continue;
|
|
}
|
|
|
|
$branch_name = $diff->getBranch();
|
|
$arc_project_phid = $diff->getArcanistProjectPHID();
|
|
|
|
queryfx(
|
|
$conn_w,
|
|
'UPDATE %T SET branchName = %s, arcanistProjectPHID = %s WHERE id = %d',
|
|
$table->getTableName(),
|
|
$branch_name,
|
|
$arc_project_phid,
|
|
$revision->getID());
|
|
}
|
|
} while (count($revisions) == 1000);
|
|
|
|
$table->endReadLocking();
|
|
$table->saveTransaction();
|
|
echo "\n".pht('Done.')."\n";
|