sync
[www.jankratochvil.net.git] / project / Lib.pm
index 6ccc6e3..e439ece 100644 (file)
@@ -99,7 +99,7 @@ my($class,$ListItem)=@_;
                {"key"=>qr(^cvs\b),"text"=>sub ($) {
                                                $_[0]=~s/^cvs//;
                                                $_[0]=~s/^-/ /;
-                                               return "CVS".$_[0];
+                                               return "GIT".$_[0];
                                                },
                                "format"=>sub ($$) {
                                                my($val,$key)=@_;
@@ -108,17 +108,22 @@ my($class,$ListItem)=@_;
                                                my $branch="";
                                                $branch=$1 if $val=~s/:(.*)//;
                                                return join("<br />\n\t\t",
-                                                               escapeHTML("cvs -d ".$W->{"pserver"}.":".$W->{"pserver_path"}." -z3"
-                                                                               ." checkout".(!$branch ? "" : " -r $branch -kk")
-                                                                               .($val!~m#/# ? "" : " -d ".File::Basename::basename($val))
-                                                                               ." $val"),
+#pserver:
+#                                                              escapeHTML("cvs -d ".$W->{"pserver"}.":".$W->{"pserver_path"}." -z3"
+#                                                                              ." checkout".(!$branch ? "" : " -r $branch -kk")
+#                                                                              .($val!~m#/# ? "" : " -d ".File::Basename::basename($val))
+#                                                                              ." $val"),
                                                                join(" | \n\t\t",
                                                                                map({ a_href($_->[1],$_->[0]); }
-                                                                                               ["ViewCVS CVS repository",$W->{"project_viewcvs"}.$val."/".(!$branch ? "" : '?only_with_tag='.$branch)],
-                                                                                               ["Download CVS snapshot" ,
-                                                                                                               $W->{"project_viewcvs"}.$val."/".File::Basename::basename($val).".tar.gz?tarball=1"
-                                                                                                                               .(!$branch ? "" : '&only_with_tag='.$branch)],
-                                                                                               ["CVS ChangeLog"         ,"/project/ChangeLog.pm?cvs=$val"])));
+#                                                                                              ["ViewCVS CVS repository",$W->{"project_viewcvs"}.$val."/".(!$branch ? "" : '?only_with_tag='.$branch)],
+#                                                                                              ["Download CVS snapshot" ,
+#                                                                                                              $W->{"project_viewcvs"}.$val."/".File::Basename::basename($val).".tar.gz?tarball=1"
+#                                                                                                                              .(!$branch ? "" : '&only_with_tag='.$branch)],
+##FIXME:                                                                                               ["CVS ChangeLog"         ,"/project/ChangeLog.pm?cvs=$val"]
+                                                                                               ["GIT repository",$W->{"project_viewcvs"}."?p=$val.git;a=tree".(!$branch ? "" : ";hb=$branch")],
+                                                                                               ["Download GIT snapshot",$W->{"project_viewcvs"}."?p=$val.git;a=snapshot;sf=tgz;h=".(!$branch ? "HEAD" : "$branch")],
+                                                                                               ["GIT shortlog",$W->{"project_viewcvs"}."?p=$val.git;a=shortlog".(!$branch ? "" : ";h=refs/heads/$branch")]
+                                                                                               )));
                                                }},
                {"key"=>"ownership","text"=>"Ownership"},
                {"key"=>"sponsorship","text"=>"Sponsorship"},
@@ -196,6 +201,7 @@ my($class,%args)=@_;
                        %args,
                        "heading_novskip"=>1,
                        );
+       do { &{$_}() if $_; } for $W->{__PACKAGE__."-init-hook"};
        $class->heading();
        print $class->platforms($ListItem->{"platform"});
        $class->print_project($ListItem,%args);