mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-11 07:11:04 +01:00
When a commit appears as an ancestor of a permanent ref for the first time, run all import steps
Summary: Depends on D20427. Ref T13277. As an optimization, when we discover that a commit which was previously only on a non-permanent ref ("tmp-epriestley-123") is now reachable from a permanent ref ("master"), we currently queue only a new "message" parse step. This is an optimization because these commits previously got the full treatment (feed, publish, audit, etc) as soon as they were discovered. Now, those steps only happen once a commit is reachable from a permanent ref, so we need to run everything. Test Plan: - Pushed local "tmp-123" branch to remote tag "tmp-123". - Updated repository with "bin/repository update", saw commit import as a "not on any permanent ref" commit, with no herald/audit/etc. - Merged "tmp-123" tag into "master". - Pushed new "master". - Updated repository with "bin/repository refs ... --trace --verbose", saw commit detected as now reachable from a permament ref. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13277 Differential Revision: https://secure.phabricator.com/D20428
This commit is contained in:
parent
9107c2e262
commit
d1223ac577
1 changed files with 8 additions and 3 deletions
|
@ -455,7 +455,7 @@ final class PhabricatorRepositoryRefEngine
|
|||
|
||||
$all_commits = queryfx_all(
|
||||
$conn_w,
|
||||
'SELECT id, commitIdentifier, importStatus FROM %T
|
||||
'SELECT id, phid, commitIdentifier, importStatus FROM %T
|
||||
WHERE repositoryID = %d AND commitIdentifier IN (%Ls)',
|
||||
$commit_table->getTableName(),
|
||||
$repository->getID(),
|
||||
|
@ -485,10 +485,15 @@ final class PhabricatorRepositoryRefEngine
|
|||
|
||||
$data = array(
|
||||
'commitID' => $row['id'],
|
||||
'only' => true,
|
||||
);
|
||||
|
||||
PhabricatorWorker::scheduleTask($class, $data);
|
||||
PhabricatorWorker::scheduleTask(
|
||||
$class,
|
||||
$data,
|
||||
array(
|
||||
'priority' => PhabricatorWorker::PRIORITY_COMMIT,
|
||||
'objectPHID' => $row['phid'],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue