Differential D20428 Diff 48730 src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
| Show First 20 Lines • Show All 449 Lines • ▼ Show 20 Lines | switch ($vcs) { | ||||
| $class = 'PhabricatorRepositoryMercurialCommitMessageParserWorker'; | $class = 'PhabricatorRepositoryMercurialCommitMessageParserWorker'; | ||||
| break; | break; | ||||
| default: | default: | ||||
| throw new Exception(pht("Unknown repository type '%s'!", $vcs)); | throw new Exception(pht("Unknown repository type '%s'!", $vcs)); | ||||
| } | } | ||||
| $all_commits = queryfx_all( | $all_commits = queryfx_all( | ||||
| $conn_w, | $conn_w, | ||||
| 'SELECT id, commitIdentifier, importStatus FROM %T | 'SELECT id, phid, commitIdentifier, importStatus FROM %T | ||||
| WHERE repositoryID = %d AND commitIdentifier IN (%Ls)', | WHERE repositoryID = %d AND commitIdentifier IN (%Ls)', | ||||
| $commit_table->getTableName(), | $commit_table->getTableName(), | ||||
| $repository->getID(), | $repository->getID(), | ||||
| $identifiers); | $identifiers); | ||||
| $closeable_flag = PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE; | $closeable_flag = PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE; | ||||
| $all_commits = ipull($all_commits, null, 'commitIdentifier'); | $all_commits = ipull($all_commits, null, 'commitIdentifier'); | ||||
| Show All 13 Lines | foreach ($identifiers as $identifier) { | ||||
| $conn_w, | $conn_w, | ||||
| 'UPDATE %T SET importStatus = (importStatus | %d) WHERE id = %d', | 'UPDATE %T SET importStatus = (importStatus | %d) WHERE id = %d', | ||||
| $commit_table->getTableName(), | $commit_table->getTableName(), | ||||
| $closeable_flag, | $closeable_flag, | ||||
| $row['id']); | $row['id']); | ||||
| $data = array( | $data = array( | ||||
| 'commitID' => $row['id'], | 'commitID' => $row['id'], | ||||
| 'only' => true, | |||||
artms: Removing this option might have introduced regression: see fix D20880 - where Differential… | |||||
| ); | ); | ||||
| PhabricatorWorker::scheduleTask($class, $data); | PhabricatorWorker::scheduleTask( | ||||
| $class, | |||||
| $data, | |||||
| array( | |||||
| 'priority' => PhabricatorWorker::PRIORITY_COMMIT, | |||||
| 'objectPHID' => $row['phid'], | |||||
| )); | |||||
| } | } | ||||
| } | } | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| private function newRefCursor( | private function newRefCursor( | ||||
| PhabricatorRepository $repository, | PhabricatorRepository $repository, | ||||
| ▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines | |||||
Removing this option might have introduced regression: see fix D20880 - where Differential Revision cannot be closed based on matching hashes