[Fusionforge-commits] r8016 - in trunk/gforge: etc/httpd.d plugins/scmbzr/common plugins/scmcpold/common plugins/scmdarcs/common plugins/scmgit/common plugins/scmhg/common plugins/scmsvn/common
Roland Mas
lolando at libremir.placard.fr.eu.org
Thu Aug 27 15:45:28 CEST 2009
Author: lolando
Date: 2009-08-27 15:45:28 +0200 (Thu, 27 Aug 2009)
New Revision: 8016
Modified:
trunk/gforge/etc/httpd.d/06maindirhttp
trunk/gforge/etc/httpd.d/07maindirhttp.ssl
trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php
trunk/gforge/plugins/scmcpold/common/CpoldPlugin.class.php
trunk/gforge/plugins/scmdarcs/common/DarcsPlugin.class.php
trunk/gforge/plugins/scmgit/common/GitPlugin.class.php
trunk/gforge/plugins/scmhg/common/HgPlugin.class.php
trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php
Log:
Share the scm repos over anonymous HTTP where applicable
Modified: trunk/gforge/etc/httpd.d/06maindirhttp
===================================================================
--- trunk/gforge/etc/httpd.d/06maindirhttp 2009-08-27 13:45:18 UTC (rev 8015)
+++ trunk/gforge/etc/httpd.d/06maindirhttp 2009-08-27 13:45:28 UTC (rev 8016)
@@ -65,6 +65,14 @@
Alias {sys_urlprefix} /usr/share/gforge/www/
+ Alias /anonscm/ {var_lib_gforge}/chroot/scmrepos/
+ <DirectoryMatch {var_lib_gforge}/chroot/scmrepos/[^/]*>
+ Options -Indexes
+ </DirectoryMatch>
+ <DirectoryMatch {var_lib_gforge}/chroot/scmrepos/[^/]*/.*>
+ Options +Indexes
+ </DirectoryMatch>
+
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
Modified: trunk/gforge/etc/httpd.d/07maindirhttp.ssl
===================================================================
--- trunk/gforge/etc/httpd.d/07maindirhttp.ssl 2009-08-27 13:45:18 UTC (rev 8015)
+++ trunk/gforge/etc/httpd.d/07maindirhttp.ssl 2009-08-27 13:45:28 UTC (rev 8016)
@@ -67,6 +67,14 @@
Alias {sys_urlprefix} {usr_share_gforge}/www/
+ Alias /anonscm/ {var_lib_gforge}/chroot/scmrepos/
+ <DirectoryMatch {var_lib_gforge}/chroot/scmrepos/[^/]*>
+ Options -Indexes
+ </DirectoryMatch>
+ <DirectoryMatch {var_lib_gforge}/chroot/scmrepos/[^/]*/.*>
+ Options +Indexes
+ </DirectoryMatch>
+
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
Modified: trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php 2009-08-27 13:45:18 UTC (rev 8015)
+++ trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php 2009-08-27 13:45:28 UTC (rev 8016)
@@ -53,9 +53,9 @@
}
function getInstructionsForAnon ($project) {
- $b = _('<p><b>Anonymous Bazaar Access</b></p><p>This project\'s Bazaar repository can be checked out through anonymous access with the following command(s).</p>');
+ $b = _('<p><b>Anonymous Bazaar Access</b></p><p>This project\'s Bazaar repository can be checked out through anonymous access with the following command.</p>');
$b .= '<p>' ;
- $b .= '<tt>bzr checkout http://'.$project->getSCMBox().$this->bzr_root.'/'.$project->getUnixName().'/'._('branchname').'</tt><br />';
+ $b .= '<tt>bzr checkout '.util_make_url ('/anonscm/bzr/'.$project->getUnixName().'/').'</tt><br />';
$b .= '</p>';
return $b ;
}
Modified: trunk/gforge/plugins/scmcpold/common/CpoldPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmcpold/common/CpoldPlugin.class.php 2009-08-27 13:45:18 UTC (rev 8015)
+++ trunk/gforge/plugins/scmcpold/common/CpoldPlugin.class.php 2009-08-27 13:45:28 UTC (rev 8016)
@@ -59,7 +59,9 @@
}
function getInstructionsForAnon ($project) {
- $b = _('<p><b>Anonymous CPOLD Access</b></p><p>This project\'s CPOLD repository cannot be anonymously checked out yet.</p>');
+ $b = sprintf (_('<p><b>Anonymous CPOLD Access</b></p><p>This project\'s CPOLD repository can be accessep anonymously at %s.</p>'),
+ util_make_link ('/anonscm/cpold/'.$project->getUnixName().'/',
+ util_make_url ('/anonscm/cpold/'.$project->getUnixName().'/'))) ;
return $b ;
}
Modified: trunk/gforge/plugins/scmdarcs/common/DarcsPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmdarcs/common/DarcsPlugin.class.php 2009-08-27 13:45:18 UTC (rev 8015)
+++ trunk/gforge/plugins/scmdarcs/common/DarcsPlugin.class.php 2009-08-27 13:45:28 UTC (rev 8016)
@@ -47,12 +47,11 @@
}
function getInstructionsForAnon ($project) {
- $b = _('<p><b>Anonymous Darcs Access</b></p><p>This project\'s Darcs repository cannot be anonymously checked out yet.</p>');
+ $b = _('<p><b>Anonymous Darcs Access</b></p><p>This project\'s Darcs repository can be checked out through anonymous access with the following command.</p>');
$b .= '<p>' ;
- $b .= '<tt>bzr checkout http://'.$project->getSCMBox().$this->bzr_root.'/'.$project->getUnixName().'/'._('branchname').'</tt><br />';
+ $b .= '<tt>darcs get '.util_make_url ('/anonscm/darcs/'.$project->getUnixName().'/').'</tt><br />';
$b .= '</p>';
return $b ;
- return $b ;
}
function getInstructionsForRW ($project) {
Modified: trunk/gforge/plugins/scmgit/common/GitPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmgit/common/GitPlugin.class.php 2009-08-27 13:45:18 UTC (rev 8015)
+++ trunk/gforge/plugins/scmgit/common/GitPlugin.class.php 2009-08-27 13:45:28 UTC (rev 8016)
@@ -46,7 +46,10 @@
}
function getInstructionsForAnon ($project) {
- $b = _('<p><b>Anonymous GIT Access</b></p><p>This project\'s GIT repository cannot be anonymously checked out yet.</p>');
+ $b = _('<p><b>Anonymous Git Access</b></p><p>This project\'s Git repository can be checked out through anonymous access with the following command.</p>');
+ $b .= '<p>' ;
+ $b .= '<tt>git clone '.util_make_url ('/anonscm/git/'.$project->getUnixName().'/').'</tt><br />';
+ $b .= '</p>';
return $b ;
}
Modified: trunk/gforge/plugins/scmhg/common/HgPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmhg/common/HgPlugin.class.php 2009-08-27 13:45:18 UTC (rev 8015)
+++ trunk/gforge/plugins/scmhg/common/HgPlugin.class.php 2009-08-27 13:45:28 UTC (rev 8016)
@@ -46,7 +46,10 @@
}
function getInstructionsForAnon ($project) {
- $b = _('<p><b>Anonymous Mercurial Access</b></p><p>This project\'s Mercurial repository cannot be anonymously checked out yet.</p>');
+ $b = _('<p><b>Anonymous Mercurial Access</b></p><p>This project\'s Mercurial repository can be checked out through anonymous access with the following command.</p>');
+ $b .= '<p>' ;
+ $b .= '<tt>hg clone '.util_make_url ('/anonscm/hg/'.$project->getUnixName().'/').'</tt><br />';
+ $b .= '</p>';
return $b ;
}
Modified: trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php 2009-08-27 13:45:18 UTC (rev 8015)
+++ trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php 2009-08-27 13:45:28 UTC (rev 8016)
@@ -282,8 +282,6 @@
xml_parser_free ($xml_parser);
- //..................
-
// inserting group results in stats_cvs_groups
if (!db_query_params ('INSERT INTO stats_cvs_group (month,day,group_id,checkouts,commits,adds) VALUES ($1,$2,$3,$4,$5,$6)',
array ($month_string,
More information about the Fusionforge-commits
mailing list