Ensure that the SyncMonotone plugin does not throw around errors

in case of a local (non-usher) monotone setup.
master
Thomas Keller 2010-09-17 02:36:48 +02:00
parent 29b8bf8a4e
commit 50638c768f
1 changed files with 24 additions and 2 deletions

View File

@ -76,6 +76,10 @@ class IDF_Plugin_SyncMonotone
return;
}
if (Pluf::f('mtn_db_access', 'local') == 'local') {
return;
}
$projecttempl = Pluf::f('mtn_repositories', false);
if ($projecttempl === false) {
throw new IDF_Scm_Exception(
@ -278,6 +282,10 @@ class IDF_Plugin_SyncMonotone
return;
}
if (Pluf::f('mtn_db_access', 'local') == 'local') {
return;
}
$mtn = IDF_Scm_Monotone::factory($project);
$stdio = $mtn->getStdio();
@ -338,6 +346,10 @@ class IDF_Plugin_SyncMonotone
return;
}
if (Pluf::f('mtn_db_access', 'local') == 'local') {
return;
}
$usher_config = Pluf::f('mtn_usher_conf', false);
if (!$usher_config || !is_writable($usher_config)) {
throw new IDF_Scm_Exception(
@ -419,8 +431,13 @@ class IDF_Plugin_SyncMonotone
*/
public function processKeyCreate($key)
{
if ($key->getType() != 'mtn')
if ($key->getType() != 'mtn') {
return;
}
if (Pluf::f('mtn_db_access', 'local') == 'local') {
return;
}
foreach (Pluf::factory('IDF_Project')->getList() as $project) {
$conf = new IDF_Conf();
@ -525,8 +542,13 @@ class IDF_Plugin_SyncMonotone
*/
public function processKeyDelete($key)
{
if ($key->getType() != 'mtn')
if ($key->getType() != 'mtn') {
return;
}
if (Pluf::f('mtn_db_access', 'local') == 'local') {
return;
}
foreach (Pluf::factory('IDF_Project')->getList() as $project) {
$conf = new IDF_Conf();