* fix bug.
This commit is contained in:
@@ -99,7 +99,7 @@ class gitModel extends model
|
||||
$tagGroup = array();
|
||||
foreach($tagPlans as $integration) $tagGroup[$integration->repo][$integration->id] = $integration;
|
||||
|
||||
foreach($this->repos as $repo)
|
||||
foreach($this->repos as $repoID => $repo)
|
||||
{
|
||||
$this->printLog("begin repo $repo->id");
|
||||
if(!$this->setRepo($repo)) return false;
|
||||
@@ -112,7 +112,7 @@ class gitModel extends model
|
||||
|
||||
$this->printLog("get this repo logs.");
|
||||
|
||||
$lastInDB = $this->getLatestComment($repoID);
|
||||
$lastInDB = $this->repo->getLatestComment($repoID);
|
||||
/* Ignore unsynced branch. */
|
||||
if(empty($lastInDB)) continue;
|
||||
|
||||
@@ -157,7 +157,7 @@ class gitModel extends model
|
||||
}
|
||||
}
|
||||
$version = $this->repo->saveOneCommit($repoID, $log, $version);
|
||||
$commits += count($logs)
|
||||
$commits += count($logs);
|
||||
}
|
||||
}
|
||||
$this->repo->updateCommitCount($repoID, $commits);
|
||||
|
||||
@@ -557,13 +557,17 @@ class repoModel extends model
|
||||
if($existsRevision)
|
||||
{
|
||||
if($branch) $this->dao->replace(TABLE_REPOBRANCH)->set('repo')->eq($repoID)->set('revision')->eq($existsRevision->id)->set('branch')->eq($branch)->exec();
|
||||
continue;
|
||||
return true;
|
||||
}
|
||||
|
||||
$commit->repo = $repoID;
|
||||
$commit->commit = $version;
|
||||
$commit->comment = htmlspecialchars($commit->comment);
|
||||
$this->dao->insert(TABLE_REPOHISTORY)->data($commit)->exec();
|
||||
$history = new stdclass();
|
||||
$history->repo = $repoID;
|
||||
$history->revision = $commit->revision;
|
||||
$history->committer = $commit->committer;
|
||||
$history->time = $commit->time;
|
||||
$history->commit = $version;
|
||||
$history->comment = htmlspecialchars($commit->comment);
|
||||
$this->dao->insert(TABLE_REPOHISTORY)->data($history)->exec();
|
||||
if(!dao::isError())
|
||||
{
|
||||
$commitID = $this->dao->lastInsertID();
|
||||
|
||||
@@ -106,7 +106,7 @@ class svnModel extends model
|
||||
if(!$this->setRepo($repo)) return false;
|
||||
|
||||
$this->printLog("get this repo logs.");
|
||||
$lastInDB = $this->getLatestComment($repoID);
|
||||
$lastInDB = $this->repo->getLatestComment($repoID);
|
||||
/* Ignore unsynced repo. */
|
||||
if(empty($lastInDB)) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user