[vhffs-dev] [976] Now suffixing git repository by .git, it seems to be a famous rule

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 976
Author:   gradator
Date:     2007-10-11 15:40:42 +0000 (Thu, 11 Oct 2007)

Log Message:
-----------
Now suffixing git repository by .git, it seems to be a famous rule

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Services/Git.pm
    trunk/vhffs-panel/git/create.pl
    trunk/vhffs-panel/templates/git/create.tmpl


Modified: trunk/vhffs-api/src/Vhffs/Services/Git.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Git.pm	2007-10-11 15:17:52 UTC (rev 975)
+++ trunk/vhffs-api/src/Vhffs/Services/Git.pm	2007-10-11 15:40:42 UTC (rev 976)
@@ -42,7 +42,7 @@
 
 sub check_name($) {
     my $name = shift;
-    return ($name =~ /^[a-z0-9]+\/[a-z0-9]{3,64}$/);
+    return ($name =~ /^[a-z0-9]+\/[a-z0-9]{3,64}\.git$/);
 }
 
 sub delete

Modified: trunk/vhffs-panel/git/create.pl
===================================================================
--- trunk/vhffs-panel/git/create.pl	2007-10-11 15:17:52 UTC (rev 975)
+++ trunk/vhffs-panel/git/create.pl	2007-10-11 15:40:42 UTC (rev 976)
@@ -65,7 +65,7 @@
     my $user = $panel->{user};
     my $group = $panel->{group};
     $reponame = $cgi->param('reponame');
-    my $fullreponame = $groupname.'/'.$reponame;
+    my $fullreponame = $groupname.'/'.$reponame.'.git';
     $description = $cgi->param('description');
     if(!(defined $reponame && defined $description)) {
         $panel->add_error( gettext('CGI error') );
@@ -93,6 +93,7 @@
 	$template->param( GROUP_NAME => gettext("Group owning this git repository") );
 
 	$template->param( GROUP => $groupname );
+	$template->param( GIT_SUFFIX => '.git' );
 	$template->param( SEND => gettext("Send") );
 	$template->param( DESCRIPTION => gettext("Description") );
     $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );

Modified: trunk/vhffs-panel/templates/git/create.tmpl
===================================================================
--- trunk/vhffs-panel/templates/git/create.tmpl	2007-10-11 15:17:52 UTC (rev 975)
+++ trunk/vhffs-panel/templates/git/create.tmpl	2007-10-11 15:40:42 UTC (rev 976)
@@ -9,7 +9,7 @@
 		<label for="reponame">
 			<TMPL_VAR NAME="REPOSITORY_NAME">: 
 		</label>	
-		<TMPL_VAR NAME="GROUP">/<input type="text" name="reponame" id="reponame" value="<tmpl_var name="REPOSITORY_VALUE">"/>
+		<TMPL_VAR NAME="GROUP">/<input type="text" name="reponame" id="reponame" value="<tmpl_var name="REPOSITORY_VALUE">"/><TMPL_VAR NAME="GIT_SUFFIX">
 	</p>
 	<p>
 		<label for="PROJECT_USAGE">


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/