mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 17:02:41 +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
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
$conn_w = id(new PhabricatorRepository())->establishConnection('w');
|
|
|
|
echo pht('Adding transaction log event groups...')."\n";
|
|
|
|
$logs = queryfx_all(
|
|
$conn_w,
|
|
'SELECT * FROM %T GROUP BY transactionKey ORDER BY id ASC',
|
|
'repository_pushlog');
|
|
foreach ($logs as $log) {
|
|
$id = $log['id'];
|
|
echo pht('Migrating log %d...', $id)."\n";
|
|
if ($log['pushEventPHID']) {
|
|
continue;
|
|
}
|
|
|
|
$event_phid = id(new PhabricatorRepositoryPushEvent())->generatePHID();
|
|
|
|
queryfx(
|
|
$conn_w,
|
|
'INSERT INTO %T (phid, repositoryPHID, epoch, pusherPHID, remoteAddress,
|
|
remoteProtocol, rejectCode, rejectDetails)
|
|
VALUES (%s, %s, %d, %s, %d, %s, %d, %s)',
|
|
'repository_pushevent',
|
|
$event_phid,
|
|
$log['repositoryPHID'],
|
|
$log['epoch'],
|
|
$log['pusherPHID'],
|
|
$log['remoteAddress'],
|
|
$log['remoteProtocol'],
|
|
$log['rejectCode'],
|
|
$log['rejectDetails']);
|
|
|
|
queryfx(
|
|
$conn_w,
|
|
'UPDATE %T SET pushEventPHID = %s WHERE transactionKey = %s',
|
|
'repository_pushlog',
|
|
$event_phid,
|
|
$log['transactionKey']);
|
|
}
|
|
|
|
echo pht('Done.')."\n";
|