Ensure that the SyncMonotone plugin does not throw around errors
in case of a local (non-usher) monotone setup.
This commit is contained in:
parent
29b8bf8a4e
commit
50638c768f
@ -76,6 +76,10 @@ class IDF_Plugin_SyncMonotone
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Pluf::f('mtn_db_access', 'local') == 'local') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$projecttempl = Pluf::f('mtn_repositories', false);
|
$projecttempl = Pluf::f('mtn_repositories', false);
|
||||||
if ($projecttempl === false) {
|
if ($projecttempl === false) {
|
||||||
throw new IDF_Scm_Exception(
|
throw new IDF_Scm_Exception(
|
||||||
@ -278,6 +282,10 @@ class IDF_Plugin_SyncMonotone
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Pluf::f('mtn_db_access', 'local') == 'local') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$mtn = IDF_Scm_Monotone::factory($project);
|
$mtn = IDF_Scm_Monotone::factory($project);
|
||||||
$stdio = $mtn->getStdio();
|
$stdio = $mtn->getStdio();
|
||||||
|
|
||||||
@ -338,6 +346,10 @@ class IDF_Plugin_SyncMonotone
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Pluf::f('mtn_db_access', 'local') == 'local') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$usher_config = Pluf::f('mtn_usher_conf', false);
|
$usher_config = Pluf::f('mtn_usher_conf', false);
|
||||||
if (!$usher_config || !is_writable($usher_config)) {
|
if (!$usher_config || !is_writable($usher_config)) {
|
||||||
throw new IDF_Scm_Exception(
|
throw new IDF_Scm_Exception(
|
||||||
@ -419,8 +431,13 @@ class IDF_Plugin_SyncMonotone
|
|||||||
*/
|
*/
|
||||||
public function processKeyCreate($key)
|
public function processKeyCreate($key)
|
||||||
{
|
{
|
||||||
if ($key->getType() != 'mtn')
|
if ($key->getType() != 'mtn') {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Pluf::f('mtn_db_access', 'local') == 'local') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (Pluf::factory('IDF_Project')->getList() as $project) {
|
foreach (Pluf::factory('IDF_Project')->getList() as $project) {
|
||||||
$conf = new IDF_Conf();
|
$conf = new IDF_Conf();
|
||||||
@ -525,8 +542,13 @@ class IDF_Plugin_SyncMonotone
|
|||||||
*/
|
*/
|
||||||
public function processKeyDelete($key)
|
public function processKeyDelete($key)
|
||||||
{
|
{
|
||||||
if ($key->getType() != 'mtn')
|
if ($key->getType() != 'mtn') {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Pluf::f('mtn_db_access', 'local') == 'local') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (Pluf::factory('IDF_Project')->getList() as $project) {
|
foreach (Pluf::factory('IDF_Project')->getList() as $project) {
|
||||||
$conf = new IDF_Conf();
|
$conf = new IDF_Conf();
|
||||||
|
Loading…
Reference in New Issue
Block a user