@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+8 -3
+8 -3
src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
··· 455 455 456 456 $all_commits = queryfx_all( 457 457 $conn_w, 458 - 'SELECT id, commitIdentifier, importStatus FROM %T 458 + 'SELECT id, phid, commitIdentifier, importStatus FROM %T 459 459 WHERE repositoryID = %d AND commitIdentifier IN (%Ls)', 460 460 $commit_table->getTableName(), 461 461 $repository->getID(), ··· 485 485 486 486 $data = array( 487 487 'commitID' => $row['id'], 488 - 'only' => true, 489 488 ); 490 489 491 - PhabricatorWorker::scheduleTask($class, $data); 490 + PhabricatorWorker::scheduleTask( 491 + $class, 492 + $data, 493 + array( 494 + 'priority' => PhabricatorWorker::PRIORITY_COMMIT, 495 + 'objectPHID' => $row['phid'], 496 + )); 492 497 } 493 498 } 494 499