Fixed to sync the timeline only if the backend is available.

This commit is contained in:
Loic d'Anterroches 2009-05-27 18:04:33 +02:00
parent 7d84da4d7c
commit 6ef721d3a8

View File

@ -343,6 +343,7 @@ class IDF_Scm
$key = 'IDF_Scm:'.$project->shortname.':lastsync'; $key = 'IDF_Scm:'.$project->shortname.':lastsync';
if (null === ($res=$cache->get($key))) { if (null === ($res=$cache->get($key))) {
$scm = IDF_Scm::get($project); $scm = IDF_Scm::get($project);
if ($scm->isAvailable()) {
foreach ($scm->getChangeLog($scm->getMainBranch(), 25) as $change) { foreach ($scm->getChangeLog($scm->getMainBranch(), 25) as $change) {
IDF_Commit::getOrAdd($change, $project); IDF_Commit::getOrAdd($change, $project);
} }
@ -350,4 +351,5 @@ class IDF_Scm
} }
} }
} }
}