@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.

run record commit if its the first time seen

Test Plan: test live.

Reviewers: nh

Reviewed By: nh

CC: epriestley, aran

Differential Revision: https://secure.phabricator.com/D2832

Jason Ge 22e606d4 06c976b7

+20 -10
+20 -10
src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
··· 329 329 private static function updateCommit( 330 330 PhabricatorRepository $repository, 331 331 $commit_identifier, 332 - $branch) { 332 + $branch, 333 + $exists) { 333 334 334 335 $commit = id(new PhabricatorRepositoryCommit())->loadOneWhere( 335 336 'repositoryID = %s AND commitIdentifier = %s', ··· 348 349 $data->setCommitDetail('seenOnBranches', $branches); 349 350 $data->save(); 350 351 351 - self::insertTask( 352 - $repository, 353 - $commit, 354 - array( 355 - 'only' => true 356 - )); 352 + if (!$exists) { 353 + self::insertTask( 354 + $repository, 355 + $commit, 356 + array( 357 + 'only' => true 358 + )); 359 + } 357 360 } 358 361 359 362 private static function insertTask( ··· 612 615 $target); 613 616 $epoch = trim($epoch); 614 617 618 + $commit = id(new PhabricatorRepositoryCommit())->loadOneWhere( 619 + 'repositoryID = %s AND commitIdentifier = %s', 620 + $repository->getID(), 621 + $target); 622 + 623 + if (!$commit) { 624 + self::recordCommit($repository, $target, $epoch); 625 + } 626 + 615 627 if ($branch !== null) { 616 - self::updateCommit($repository, $target, $branch); 617 - } else { 618 - self::recordCommit($repository, $target, $epoch); 628 + self::updateCommit($repository, $target, $branch, $commit); 619 629 } 620 630 621 631 if (empty($insert)) {