Changeset View
Changeset View
Standalone View
Standalone View
resources/sql/patches/20130409.commitdrev.php
| Show All 16 Lines | foreach (new LiskMigrationIterator($commit_table) as $commit) { | ||||
| if (!$revision_phid) { | if (!$revision_phid) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| $commit_drev = PhabricatorEdgeConfig::TYPE_COMMIT_HAS_DREV; | $commit_drev = PhabricatorEdgeConfig::TYPE_COMMIT_HAS_DREV; | ||||
| $editor->addEdge($commit->getPHID(), $commit_drev, $revision_phid); | $editor->addEdge($commit->getPHID(), $commit_drev, $revision_phid); | ||||
| $edges++; | $edges++; | ||||
| if ($edges % 256 == 0) { | if ($edges % 256 == 0) { | ||||
| echo "."; | echo '.'; | ||||
| $editor->save(); | $editor->save(); | ||||
| $editor = id(new PhabricatorEdgeEditor())->setSuppressEvents(true); | $editor = id(new PhabricatorEdgeEditor())->setSuppressEvents(true); | ||||
| } | } | ||||
| } | } | ||||
| echo "."; | echo '.'; | ||||
| $editor->save(); | $editor->save(); | ||||
| echo "\nDone.\n"; | echo "\nDone.\n"; | ||||