[Fusionforge-commits] FusionForge branch feature/concurrent-ssh-http-for-scm-5.3 updated. 3b75f77cb980d1cc12638da859a9cfe235470180

Roland Mas lolando at fusionforge.org
Wed Sep 17 17:04:50 CEST 2014


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, feature/concurrent-ssh-http-for-scm-5.3 has been updated
       via  3b75f77cb980d1cc12638da859a9cfe235470180 (commit)
      from  9b223895a3d3e9e8fd0b8d93c4065cf9ca21ec5d (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 3b75f77cb980d1cc12638da859a9cfe235470180
Author: Roland Mas <lolando at debian.org>
Date:   Wed Sep 17 17:04:44 2014 +0200

    List instructions for personal Git repositories over Smart HTTP

diff --git a/src/plugins/scmgit/common/GitPlugin.class.php b/src/plugins/scmgit/common/GitPlugin.class.php
index a739ae0..a24fdbe 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -289,7 +289,7 @@ class GitPlugin extends SCMPlugin {
 			$b .= '<p class="error">Error: No access protocol has been allowed for the Git plugin in scmgit.ini: : use_ssh and use_dav are disabled</p>';
 		}
 
-		if (session_loggedin() && forge_get_config('use_ssh', 'scmgit')) {
+		if (session_loggedin()) {
 			$u = user_get_object(user_getid());
 			if ($u->getUnixStatus() == 'A') {
 				$result = db_query_params('SELECT * FROM scm_personal_repos p WHERE p.group_id=$1 AND p.user_id=$2 AND plugin_id=$3',
@@ -301,9 +301,14 @@ class GitPlugin extends SCMPlugin {
 					$b .= _('Access to your personal repository');
 					$b .= '</h2>';
 					$b .= '<p>';
-					$b .= _('You have a personal repository for this project, accessible through SSH with the following method. Enter your site password when prompted.');
+					$b .= _('You have a personal repository for this project, accessible through SSH with the following methods. Enter your site password when prompted.');
 					$b .= '</p>';
-					$b .= '<p><tt>git clone git+ssh://'.$u->getUnixName().'@' . $this->getBoxForProject($project) . '/'. forge_get_config('repos_path', 'scmgit') .'/'. $project->getUnixName() .'/users/'. $u->getUnixName() .'.git</tt></p>';
+					if (forge_get_config('use_ssh', 'scmgit')) {
+						$b .= '<p><tt>git clone git+ssh://'.$u->getUnixName().'@' . $this->getBoxForProject($project) . '/'. forge_get_config('repos_path', 'scmgit') .'/'. $project->getUnixName() .'/users/'. $u->getUnixName() .'.git</tt></p>';
+					}
+					if (forge_get_config('use_smarthttp', 'scmgit')) {
+						$b .= '<p><tt>git clone '.$protocol.'://'.$u->getUnixName().'@' . forge_get_config('scm_host').'/authscm/'.$u->getUnixName().'/git/'.$project->getUnixName() .'/users/'. $u->getUnixName() .'.git</tt></p>';
+					}
 				} else {
 					$glist = $u->getGroups();
 					foreach ($glist as $g) {

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

Summary of changes:
 src/plugins/scmgit/common/GitPlugin.class.php |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list