protected function postEventsActions(array $executed_events_ids, $queue_name)
 {
     $this->site_cache->restoreOwnership();
     // Since generating aliases may be costly, do it only once everything else is processed
     if ($this->backend_aliases->aliasesNeedUpdate()) {
         $this->backend_aliases->update();
     }
     // Update CVS root allow file once everything else is processed
     if ($this->backend_cvs->getCVSRootListNeedUpdate()) {
         $this->backend_cvs->CVSRootListUpdate();
     }
     // Update SVN root definition for Apache once everything else is processed
     if ($this->backend_svn->getSVNApacheConfNeedUpdate()) {
         $this->backend_svn->generateSVNApacheConf();
         // Need to refresh apache (graceful)
         system('/sbin/service httpd graceful');
     }
     // Update system user and group caches once everything else is processed
     if ($this->backend_system->getNeedRefreshUserCache()) {
         $this->backend_system->refreshUserCache();
     }
     if ($this->backend_system->getNeedRefreshGroupCache()) {
         $this->backend_system->refreshGroupCache();
     }
     $this->triggerApplicationOwnerEventsProcessing();
 }
示例#2
0
 function testConstructor()
 {
     $backend = BackendCVS::instance();
 }
示例#3
0
<?php

require_once 'pre.php';
require_once 'common/backend/BackendCVS.class.php';
function cvs_loginfo_format_data($line)
{
    $match = array();
    preg_match_all('/\\/cvsroot\\/([^\\/]*?)\\/CVSROOT\\/loginfo/', $line, $match);
    return $match[1][0];
}
$backendCVS = BackendCVS::instance();
$backendCVS->log(__FILE__ . " script execution start!");
$file_list = glob('/cvsroot/*/CVSROOT/loginfo');
$project_list = array_map('cvs_loginfo_format_data', $file_list);
foreach ($file_list as $key => $filename) {
    $output = '';
    if (!$backendCVS->_RcsCheckout($filename, $output)) {
        $backendCVS->log("Unable to checkout {$filename}, output={$output}", Backend::LOG_ERROR);
        continue;
    }
    $lines = file($filename);
    $lines_to_write = array();
    $project_name = trim($project_list[$key]);
    foreach ($lines as $line) {
        if (strpos($line, "ALL (cat;chgrp -R {$project_name} /var/lib/codendi/cvsroot/{$project_name})>/dev/null 2>&1") !== false) {
            continue;
        } else {
            $lines_to_write[] = $line;
        }
    }
    if (!empty($lines_to_write)) {
示例#4
0
 /**
  * Return a BackendCVS instance
  *
  * Let plugins propose their own backend. If none provided, use the default one.
  *
  * @return BackendCVS
  */
 public static function getCVS()
 {
     $backend = null;
     $params = array('backend' => &$backend);
     EventManager::instance()->processEvent('backend_factory_get_cvs', $params);
     if ($backend === null) {
         $backend = BackendCVS::instance();
     }
     return $backend;
 }