[Fusionforge-commits] FusionForge branch 6.1 updated. v6.1beta1-169-gddc7dbd

Franck Villaume nerville at libremir.placard.fr.eu.org
Wed Feb 21 14:26:39 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.1 has been updated
       via  ddc7dbd83a619d3953408d24aa281838b5197cba (commit)
      from  672d808bcc698e700bdac49c8a5e74e187d40a6d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=ddc7dbd83a619d3953408d24aa281838b5197cba

commit ddc7dbd83a619d3953408d24aa281838b5197cba
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Feb 21 13:26:32 2018 +0000

    scmhook: fix backend for repository_name. do not use group unixname...

diff --git a/src/plugins/scmhook/cronjobs/updateScmRepo.php b/src/plugins/scmhook/cronjobs/updateScmRepo.php
index d709982..bbaf51d 100755
--- a/src/plugins/scmhook/cronjobs/updateScmRepo.php
+++ b/src/plugins/scmhook/cronjobs/updateScmRepo.php
@@ -29,10 +29,9 @@
 require dirname(__FILE__).'/../../env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'include/cron_utils.php';
-require_once $gfplugins.'scmhook/common/scmhookPlugin.class.php';
 
 // if you want debug output, uncomment the verbose variable.
-//$verbose = true;
+$verbose = true;
 
 ############
 ###### START
@@ -56,7 +55,7 @@ function install_hooks($params) {
 
 	$group_id = $params[0];
 	// get the list of project to be updated
-	$res = db_query_params('SELECT groups.group_id, groups.scm_box, plugin_scmhook.hooks, plugin_scmhook.scm_plugin
+	$res = db_query_params('SELECT groups.group_id, groups.scm_box, plugin_scmhook.hooks, plugin_scmhook.scm_plugin, plugin_scmhook.repository_name
 				FROM groups, plugin_scmhook
 				WHERE groups.status = $1
 				AND plugin_scmhook.id_group = groups.group_id
@@ -69,7 +68,6 @@ function install_hooks($params) {
 		cron_debug("FATAL Database Query Failed: " . db_error());
 	}
 
-	$scmhookPlugin = new scmhookPlugin;
 	while ($row = db_fetch_array($res)) {
 		$group_id = $row['group_id'];
 		$group = group_get_object($group_id);
@@ -79,7 +77,7 @@ function install_hooks($params) {
 		$scmtype = $row['scm_plugin'];
 		switch ($scmtype) {
 		case 'scmsvn':
-			cron_debug("INFO start updating hooks for project ".$group->getUnixName());
+			cron_debug("INFO start updating hooks for project ".$group->getUnixName().", repository name: ".$row['repository_name']);
 			require_once $gfplugins.'scmhook/library/'.$scmtype.'/cronjobs/updateScmRepo.php';
 			$scmsvncronjob = new ScmSvnUpdateScmRepo();
 			$params = array();
@@ -95,13 +93,13 @@ function install_hooks($params) {
 			break;
 
 		case 'scmhg':
-			cron_debug("INFO start updating hooks for project ".$group->getUnixName());
+			cron_debug("INFO start updating hooks for project ".$group->getUnixName().", repository name: ".$row['repository_name']);
 			require_once $gfplugins.'scmhook/library/'.$scmtype.'/cronjobs/updateScmRepo.php';
 			$scmhgcronjob = new ScmHgUpdateScmRepo();
 			$params = array();
 			$params['group_id'] = $group_id;
 			$params['hooksString'] = $row['hooks'];
-			$params['scm_root'] = forge_get_config('repos_path', 'scmhg') . '/' . $group->getUnixName();
+			$params['scm_root'] = forge_get_config('repos_path', 'scmhg').'/'.$group->getUnixName().'/'.$row['repository_name'];
 			if ($scmhgcronjob->updateScmRepo($params)) {
 				$res_update = db_query_params('UPDATE plugin_scmhook set need_update = $1 where id_group = $2', array(0, $group_id));
 				if (!$res_update) {
@@ -111,13 +109,13 @@ function install_hooks($params) {
 			break;
 
 		case 'scmgit':
-			cron_debug("INFO start updating hooks for project ".$group->getUnixName());
+			cron_debug("INFO start updating hooks for project ".$group->getUnixName().", repository name: ".$row['repository_name']);
 			require_once $gfplugins.'scmhook/library/'.$scmtype.'/cronjobs/updateScmRepo.php';
 			$scmgitcronjob = new ScmGitUpdateScmRepo();
 			$params = array();
 			$params['group_id'] = $group_id;
 			$params['hooksString'] = $row['hooks'];
-			$params['scm_root'] = forge_get_config('repos_path', 'scmgit') . '/' . $group->getUnixName() . '/' . $group->getUnixName() . '.git' ;
+			$params['scm_root'] = forge_get_config('repos_path', 'scmgit').'/'.$group->getUnixName().'/'.$row['repository_name'].'.git' ;
 			if ($scmgitcronjob->updateScmRepo($params)) {
 				$res_update = db_query_params('UPDATE plugin_scmhook set need_update = $1 where id_group = $2', array(0, $group_id));
 				if (!$res_update) {
@@ -127,7 +125,7 @@ function install_hooks($params) {
 			break;
 
 		case 'scmcvs': {
-			cron_debug("INFO start updating hooks for project ".$group->getUnixName());
+			cron_debug("INFO start updating hooks for project ".$group->getUnixName().", repository name: ".$row['repository_name']);
 			require_once $gfplugins.'scmhook/library/'.$scmtype.'/cronjobs/updateScmRepo.php';
 			$scmcvscronjob = new ScmCvsUpdateScmRepo();
 			$params = array();

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/scmhook/cronjobs/updateScmRepo.php | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list