mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50: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:
parent
22e606d49e
commit
a75da4efac
1 changed files with 10 additions and 20 deletions
|
@ -329,8 +329,7 @@ final class PhabricatorRepositoryPullLocalDaemon
|
||||||
private static function updateCommit(
|
private static function updateCommit(
|
||||||
PhabricatorRepository $repository,
|
PhabricatorRepository $repository,
|
||||||
$commit_identifier,
|
$commit_identifier,
|
||||||
$branch,
|
$branch) {
|
||||||
$exists) {
|
|
||||||
|
|
||||||
$commit = id(new PhabricatorRepositoryCommit())->loadOneWhere(
|
$commit = id(new PhabricatorRepositoryCommit())->loadOneWhere(
|
||||||
'repositoryID = %s AND commitIdentifier = %s',
|
'repositoryID = %s AND commitIdentifier = %s',
|
||||||
|
@ -349,7 +348,6 @@ final class PhabricatorRepositoryPullLocalDaemon
|
||||||
$data->setCommitDetail('seenOnBranches', $branches);
|
$data->setCommitDetail('seenOnBranches', $branches);
|
||||||
$data->save();
|
$data->save();
|
||||||
|
|
||||||
if (!$exists) {
|
|
||||||
self::insertTask(
|
self::insertTask(
|
||||||
$repository,
|
$repository,
|
||||||
$commit,
|
$commit,
|
||||||
|
@ -357,7 +355,6 @@ final class PhabricatorRepositoryPullLocalDaemon
|
||||||
'only' => true
|
'only' => true
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private static function insertTask(
|
private static function insertTask(
|
||||||
PhabricatorRepository $repository,
|
PhabricatorRepository $repository,
|
||||||
|
@ -615,17 +612,10 @@ final class PhabricatorRepositoryPullLocalDaemon
|
||||||
$target);
|
$target);
|
||||||
$epoch = trim($epoch);
|
$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) {
|
if ($branch !== null) {
|
||||||
self::updateCommit($repository, $target, $branch, $commit);
|
self::updateCommit($repository, $target, $branch);
|
||||||
|
} else {
|
||||||
|
self::recordCommit($repository, $target, $epoch);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($insert)) {
|
if (empty($insert)) {
|
||||||
|
|
Loading…
Reference in a new issue