mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
5521f76fe4
Summary: Ref T13658. This just scrubs some of the simple references from the codebase. Most of what's left is in documentation which won't be relevant for a fork and/or which I need to separately revise (or more-or-less delete) at some point anyway. I removed the "install RHEL" and "install Ubuntu" scripts outright since I don't have any reasonable way to test them and don't plan to maintain them. Test Plan: Grepped for "phacility", "epriestley"; ran unit tests. Reviewers: cspeckmim Reviewed By: cspeckmim Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13658 Differential Revision: https://secure.phabricator.com/D21678
50 lines
1.3 KiB
PHP
50 lines
1.3 KiB
PHP
<?php
|
|
|
|
$table = new DifferentialRevision();
|
|
$conn_w = $table->establishConnection('w');
|
|
|
|
// NOTE: We migrate by revision because the relationship table doesn't have
|
|
// an "id" column.
|
|
|
|
foreach (new LiskMigrationIterator($table) as $revision) {
|
|
$revision_id = $revision->getID();
|
|
$revision_phid = $revision->getPHID();
|
|
|
|
echo pht('Migrating reviewers for %s...', "D{$revision_id}")."\n";
|
|
|
|
$reviewer_phids = queryfx_all(
|
|
$conn_w,
|
|
'SELECT objectPHID FROM %T WHERE revisionID = %d
|
|
AND relation = %s ORDER BY sequence',
|
|
'differential_relationship',
|
|
$revision_id,
|
|
'revw');
|
|
$reviewer_phids = ipull($reviewer_phids, 'objectPHID');
|
|
|
|
if (!$reviewer_phids) {
|
|
continue;
|
|
}
|
|
|
|
$editor = new PhabricatorEdgeEditor();
|
|
foreach ($reviewer_phids as $dst) {
|
|
if (phid_get_type($dst) == PhabricatorPHIDConstants::PHID_TYPE_UNKNOWN) {
|
|
// At least one old install ran into some issues here. Skip the row if we
|
|
// can't figure out what the destination PHID is.
|
|
continue;
|
|
}
|
|
|
|
$editor->addEdge(
|
|
$revision_phid,
|
|
DifferentialRevisionHasReviewerEdgeType::EDGECONST,
|
|
$dst,
|
|
array(
|
|
'data' => array(
|
|
'status' => DifferentialReviewerStatus::STATUS_ADDED,
|
|
),
|
|
));
|
|
}
|
|
|
|
$editor->save();
|
|
}
|
|
|
|
echo pht('Done.')."\n";
|