[Fusionforge-commits] FusionForge branch master updated. 5850166ca5605cf519c2fd973e94e61693823dbb

Alain Peyrat aljeux at fusionforge.org
Mon Sep 9 15:17:56 CEST 2013


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, master has been updated
       via  5850166ca5605cf519c2fd973e94e61693823dbb (commit)
       via  858246fdb0b4c64071b30154794614f758a0036e (commit)
      from  887743c11bb7df24492e026e082ec499b21f6cd0 (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 -----------------------------------------------------------------
commit 5850166ca5605cf519c2fd973e94e61693823dbb
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Mon Sep 9 15:17:32 2013 +0200

    Fix hg commits in scmhook plugin

diff --git a/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php b/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php
index e94f9b6..9fff4d8 100644
--- a/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php
+++ b/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php
@@ -63,7 +63,7 @@ class ScmHgUpdateScmRepo {
 			//now we enable new available hooks
 			$newHooks = explode('|', $hooksString);
 			if (count($newHooks)) {
-				$hooksServePushPullBundle = array();
+				$newHooksServePushPullBundle = array();
 				foreach($newHooks as $newHook) {
 					foreach($hooksServePushPullBundle as $hookServePushPullBundle) {
 						if ($hookServePushPullBundle->getClassname() == $newHook) {

commit 858246fdb0b4c64071b30154794614f758a0036e
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Mon Sep 9 09:33:21 2013 +0200

    Strings & Indent

diff --git a/src/plugins/scmhook/common/scmhookPlugin.class.php b/src/plugins/scmhook/common/scmhookPlugin.class.php
index 21202ff..2a01032 100644
--- a/src/plugins/scmhook/common/scmhookPlugin.class.php
+++ b/src/plugins/scmhook/common/scmhookPlugin.class.php
@@ -38,7 +38,6 @@ class scmhookPlugin extends Plugin {
 	}
 
 	function CallHook($hookname, &$params) {
-		$returned = true;
 		switch ($hookname) {
 			case 'scm_admin_page': {
 				$group_id = $params['group_id'];
diff --git a/src/plugins/scmhook/library/scmhg/commitEmail.class.php b/src/plugins/scmhook/library/scmhg/commitEmail.class.php
index 4297dd8..3cb7fb5 100644
--- a/src/plugins/scmhook/library/scmhg/commitEmail.class.php
+++ b/src/plugins/scmhook/library/scmhg/commitEmail.class.php
@@ -33,8 +33,9 @@ class commitEmail extends scmhook {
 	function __construct() {
 		$this->group = $GLOBALS['group'];
 		$this->name = "Commit Email";
-		$this->description = _('Every commit pushed sends a notification e-mail to the users of the commit-mailinglist.
-The hook is triggered after \'serve push pull bundle\' on the projects repository.');
+		$this->description = _('Every commit pushed sends a notification e-mail to the users of the commit-mailinglist.')
+							. "\n"
+							. _('The hook is triggered after \'serve push pull bundle\' on the projects repository.');
 		$this->classname = "commitEmail";
 		$this->label = "scmhg";
 		$this->hooktype = "serve-push-pull-bundle";
@@ -167,10 +168,10 @@ The hook is triggered after \'serve push pull bundle\' on the projects repositor
 				$hgrc .= "** = $mail";
 			} 
 			$f = fopen ("$main_repo/hgrc.new", 'w');
-			fwrite ($f, $hgrc);
-			fclose ($f);
-			rename ($main_repo.'/hgrc.new', $main_repo.'/hgrc');
-			system( "chown $unix_user:$unix_group $main_repo/hgrc" );
+			fwrite($f, $hgrc);
+			fclose($f);
+			rename($main_repo.'/hgrc.new', $main_repo.'/hgrc');
+			system("chown $unix_user:$unix_group $main_repo/hgrc" );
 			system("chmod 660 $main_repo/hgrc" );
 		}
 		return true;
@@ -226,8 +227,8 @@ The hook is triggered after \'serve push pull bundle\' on the projects repositor
 			fwrite($f, $hgrc);
 			fclose($f);
 			rename($main_repo.'/hgrc.new', $main_repo.'/hgrc');
-			system( "chown $unix_user:$unix_group $main_repo/hgrc" );
-			system( "chmod 660 $main_repo/hgrc" );
+			system("chown $unix_user:$unix_group $main_repo/hgrc" );
+			system("chmod 660 $main_repo/hgrc" );
 		}
 		return true;
 	}
diff --git a/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php b/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php
index dd4f383..e94f9b6 100644
--- a/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php
+++ b/src/plugins/scmhook/library/scmhg/cronjobs/updateScmRepo.php
@@ -28,15 +28,11 @@
 
 
 class ScmHgUpdateScmRepo {
-	function __construct() {
-		return true;
-	}
-
 	/**
-	* updateScmRepo - update the scmrepo with the new hooks
-	*
-	* @params	Array	the complete array description
-	* @return	boolean	success or not
+	 * updateScmRepo - update the scmrepo with the new hooks
+	 *
+	 * @param  Array   $params the complete array description
+	 * @return boolean    success or not
 	*/
 	function updateScmRepo($params) {
 		$group_id = $params['group_id'];
diff --git a/src/plugins/scmhook/library/scmsvn/commitTracker.class.php b/src/plugins/scmhook/library/scmsvn/commitTracker.class.php
index 087ca4c..4fd8b70 100644
--- a/src/plugins/scmhook/library/scmsvn/commitTracker.class.php
+++ b/src/plugins/scmhook/library/scmsvn/commitTracker.class.php
@@ -46,7 +46,7 @@ class commitTracker extends scmhook {
 		if ($this->group->usesTracker()) {
 			return true;
 		}
-		$this->disabledMessage = _('Hook not available due to missing dependency : Project not using tracker.');
+		$this->disabledMessage = _('Hook not available due to missing dependency: Project not using tracker.');
 		return false;
 	}
 
diff --git a/src/plugins/scmhook/library/scmsvn/cronjobs/updateScmRepo.php b/src/plugins/scmhook/library/scmsvn/cronjobs/updateScmRepo.php
index 059e7ab..3757c21 100644
--- a/src/plugins/scmhook/library/scmsvn/cronjobs/updateScmRepo.php
+++ b/src/plugins/scmhook/library/scmsvn/cronjobs/updateScmRepo.php
@@ -28,16 +28,12 @@
  */
 
 class ScmSvnUpdateScmRepo {
-	function __construct() {
-		return true;
-	}
-
 	/**
-	* updateScmRepo - update the scmrepo with the new hooks
-	*
-	* @params	Array	the complete array description
-	* @return	boolean	success or not
-	*/
+	 * updateScmRepo - update the scmrepo with the new hooks
+	 *
+	 * @params	Array	the complete array description
+	 * @return	boolean	success or not
+	 */
 	function updateScmRepo($params) {
 		$group_id = $params['group_id'];
 		$hooksString = $params['hooksString'];

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

Summary of changes:
 src/plugins/scmhook/common/scmhookPlugin.class.php    |    1 -
 .../scmhook/library/scmhg/commitEmail.class.php       |   17 +++++++++--------
 .../scmhook/library/scmhg/cronjobs/updateScmRepo.php  |   14 +++++---------
 .../scmhook/library/scmsvn/commitTracker.class.php    |    2 +-
 .../scmhook/library/scmsvn/cronjobs/updateScmRepo.php |   14 +++++---------
 5 files changed, 20 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list