* Adjust svn log sync count limit.

This commit is contained in:
caoyanyi
2023-12-14 09:57:14 +08:00
parent f7a8e0290a
commit e23c2b864a
2 changed files with 11 additions and 8 deletions
+7 -6
View File
@@ -24,12 +24,13 @@ $config->program->suffix['xml'] = "xml";
$config->program->suffix['htm'] = "xml";
$config->program->suffix['pl'] = "perl";
$config->repo->cacheTime = 10;
$config->repo->syncTime = 10;
$config->repo->batchNum = 100;
$config->repo->images = '|png|gif|jpg|ico|jpeg|bmp|';
$config->repo->binary = '|pdf|';
$config->repo->synced = '';
$config->repo->cacheTime = 10;
$config->repo->syncTime = 10;
$config->repo->batchNum = 100;
$config->repo->svnBatchNum = 10;
$config->repo->images = '|png|gif|jpg|ico|jpeg|bmp|';
$config->repo->binary = '|pdf|';
$config->repo->synced = '';
$config->repo->repoSyncLog = new stdclass();
$config->repo->repoSyncLog->one = 1;
+4 -2
View File
@@ -1133,7 +1133,7 @@ class repo extends control
$this->commonAction($repoID);
$this->scm->setEngine($repo);
$branchID = (string)$this->cookie->syncBranch;
$branchID = $repo->SCM == 'Subversion' ? '' : (string)$this->cookie->syncBranch;
$branches = $this->repoZen->getSyncBranches($repo, $branchID);
$logs = array();
@@ -1144,7 +1144,9 @@ class repo extends control
$version = empty($latestInDB) ? 1 : $latestInDB->commit + 1;
$revision = $version == 1 ? 'HEAD' : (in_array($repo->SCM, array('Git', 'Gitea', 'Gogs')) ? $latestInDB->commit : $latestInDB->revision);
$logs = $this->scm->getCommits($revision, $type == 'batch' ? $this->config->repo->batchNum : 0, $branchID);
$batchNum = $type == 'batch' ? $this->config->repo->batchNum : 0;
if($repo->SCM == 'Subversion' && $batchNum) $batchNum = $this->config->repo->svnBatchNum;
$logs = $this->scm->getCommits($revision, $batchNum, $branchID);
}
$commitCount = $this->repo->saveCommit($repoID, $logs, $version, $branchID);