mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 17:30:59 +01:00
8cbfb49b4e
Summary: Ref T5245. These were a bad idea. We no longer need actors for edge edits either, so remove those. Generally, edges have fit into the policy model as pure/low-level infrastructure, and they do not have any policy or capability information in and of themselves. Test Plan: `grep` Reviewers: chad, btrahan, joshuaspence Reviewed By: joshuaspence Subscribers: epriestley Maniphest Tasks: T5245 Differential Revision: https://secure.phabricator.com/D9840
29 lines
630 B
PHP
29 lines
630 B
PHP
<?php
|
|
|
|
echo "Migrating differential dependencies to edges...\n";
|
|
$table = new DifferentialRevision();
|
|
$table->openTransaction();
|
|
|
|
foreach (new LiskMigrationIterator($table) as $rev) {
|
|
$id = $rev->getID();
|
|
echo "Revision {$id}: ";
|
|
|
|
$deps = $rev->getAttachedPHIDs(DifferentialPHIDTypeRevision::TYPECONST);
|
|
if (!$deps) {
|
|
echo "-\n";
|
|
continue;
|
|
}
|
|
|
|
$editor = new PhabricatorEdgeEditor();
|
|
foreach ($deps as $dep) {
|
|
$editor->addEdge(
|
|
$rev->getPHID(),
|
|
PhabricatorEdgeConfig::TYPE_DREV_DEPENDS_ON_DREV,
|
|
$dep);
|
|
}
|
|
$editor->save();
|
|
echo "OKAY\n";
|
|
}
|
|
|
|
$table->saveTransaction();
|
|
echo "Done.\n";
|