diff --git a/module/repo/config.php b/module/repo/config.php index 1481a0ca41..33f9b1bd36 100644 --- a/module/repo/config.php +++ b/module/repo/config.php @@ -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; diff --git a/module/repo/control.php b/module/repo/control.php index 05c125c9cf..54d03ad6ac 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -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);