1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 21:40:55 +01:00

Revert "run record commit if its the first time seen"

Summary: This reverts commit 22e606d49e.

Test Plan: none

Reviewers: epriestley, nh

Reviewed By: nh

CC: nh, vrana, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2833
This commit is contained in:
Jason Ge 2012-06-21 20:24:12 -07:00
parent 22e606d49e
commit a75da4efac

View file

@ -329,8 +329,7 @@ final class PhabricatorRepositoryPullLocalDaemon
private static function updateCommit(
PhabricatorRepository $repository,
$commit_identifier,
$branch,
$exists) {
$branch) {
$commit = id(new PhabricatorRepositoryCommit())->loadOneWhere(
'repositoryID = %s AND commitIdentifier = %s',
@ -349,7 +348,6 @@ final class PhabricatorRepositoryPullLocalDaemon
$data->setCommitDetail('seenOnBranches', $branches);
$data->save();
if (!$exists) {
self::insertTask(
$repository,
$commit,
@ -357,7 +355,6 @@ final class PhabricatorRepositoryPullLocalDaemon
'only' => true
));
}
}
private static function insertTask(
PhabricatorRepository $repository,
@ -615,17 +612,10 @@ final class PhabricatorRepositoryPullLocalDaemon
$target);
$epoch = trim($epoch);
$commit = id(new PhabricatorRepositoryCommit())->loadOneWhere(
'repositoryID = %s AND commitIdentifier = %s',
$repository->getID(),
$target);
if (!$commit) {
self::recordCommit($repository, $target, $epoch);
}
if ($branch !== null) {
self::updateCommit($repository, $target, $branch, $commit);
self::updateCommit($repository, $target, $branch);
} else {
self::recordCommit($repository, $target, $epoch);
}
if (empty($insert)) {