Differential D19784 Diff 47250 src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php
| Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | foreach ($graph as $child => $parents) { | ||||
| $bar->update(1); | $bar->update(1); | ||||
| } | } | ||||
| $commit_table->openTransaction(); | $commit_table->openTransaction(); | ||||
| foreach (PhabricatorLiskDAO::chunkSQL($delete_sql) as $chunk) { | foreach (PhabricatorLiskDAO::chunkSQL($delete_sql) as $chunk) { | ||||
| queryfx( | queryfx( | ||||
| $conn_w, | $conn_w, | ||||
| 'DELETE FROM %T WHERE childCommitID IN (%Q)', | 'DELETE FROM %T WHERE childCommitID IN (%LQ)', | ||||
| PhabricatorRepository::TABLE_PARENTS, | PhabricatorRepository::TABLE_PARENTS, | ||||
| $chunk); | $chunk); | ||||
| } | } | ||||
| foreach (PhabricatorLiskDAO::chunkSQL($insert_sql) as $chunk) { | foreach (PhabricatorLiskDAO::chunkSQL($insert_sql) as $chunk) { | ||||
| queryfx( | queryfx( | ||||
| $conn_w, | $conn_w, | ||||
| 'INSERT INTO %T (childCommitID, parentCommitID) VALUES %Q', | 'INSERT INTO %T (childCommitID, parentCommitID) VALUES %LQ', | ||||
| PhabricatorRepository::TABLE_PARENTS, | PhabricatorRepository::TABLE_PARENTS, | ||||
| $chunk); | $chunk); | ||||
| } | } | ||||
| $commit_table->saveTransaction(); | $commit_table->saveTransaction(); | ||||
| $bar->done(); | $bar->done(); | ||||
| } | } | ||||
| } | } | ||||