mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
27 lines
595 B
PHP
27 lines
595 B
PHP
|
<?php
|
||
|
|
||
|
echo "Migrating differential dependencies to edges...\n";
|
||
|
foreach (new LiskMigrationIterator(new DifferentialRevision()) as $rev) {
|
||
|
$id = $rev->getID();
|
||
|
echo "Revision {$id}: ";
|
||
|
|
||
|
$deps = $rev->getAttachedPHIDs(PhabricatorPHIDConstants::PHID_TYPE_DREV);
|
||
|
if (!$deps) {
|
||
|
echo "-\n";
|
||
|
continue;
|
||
|
}
|
||
|
|
||
|
$editor = new PhabricatorEdgeEditor();
|
||
|
$editor->setSuppressEvents(true);
|
||
|
foreach ($deps as $dep) {
|
||
|
$editor->addEdge(
|
||
|
$rev->getPHID(),
|
||
|
PhabricatorEdgeConfig::TYPE_DREV_DEPENDS_ON_DREV,
|
||
|
$dep);
|
||
|
}
|
||
|
$editor->save();
|
||
|
echo "OKAY\n";
|
||
|
}
|
||
|
|
||
|
echo "Done.\n";
|