From: Sham Chukoury Date: Fri, 26 Aug 2005 11:16:05 GMT Subject: [PATCH] gitweb - XMMS2 project customisations Message-ID: <430EF9F5.70003@xmms.org> G'day. I figured you folks might be interested in a number of modifications the XMMS2 team have made to gitweb. All the changes can be seen at http://git.xmms.se 1) Navbar refactoring (gitweb-xmms2navbar.diff) The original idea was to add a link to our snapshots directory, in the navigation bar at the top of every gitweb page. The problem was that the code for producing the navbar HTML was mostly duplicated in various different places. I refactored the code so that a single 'git_navbar' subroutine is called every time gitweb needs a navbar. The patch itself probably needs some cleaning up: 1) I omitted the git_navbar call in one place, as the original navbar code there didn't look like the navbar code in other places, 2) there's a 'snapshot link' in the navbar which won't work unless gitweb-xmms2snapshots.diff is also applied ($snapshots_url isn't defined in gitweb-xmms2navbar.diff) 2) Commit tags support (gitweb-xmms2committags.diff) We originally started using specific commit tags during the development of XMMS2 to facilitate the generation of changelogs at every release. This patch reformats commit descriptions containing 'BUG' or 'FEATURE' to produce hyperlinks to bug reports on our mantis bug tracker (http://bugs.xmms2.xmms.se), as well as linking to release information pages ('RELEASE' tag). You could adapt this patch to provide support for other custom tags. It might also be possible to cleverly integrate the committags and committags_shortlog subroutines into a single subroutine.. I couldn't figure it out easily enough - my Perl(+regexp)-fu isn't strong enough. ;) 3) Snapshot integration (gitweb-xmms2snapshots.diff & snapshot.cgi) This patch makes it possible to easily produce snapshots of every commit in a git tree. Hyperlinks to 'snapshot' or 'latest snapshot' are added in various places. All you need is to have a CGI script to handle the request, with 'tree' and 'commit' parameters, where 'tree' refers to a git tree/repository and 'commit' is either a commit hash or 'HEAD'. I'm also attaching snapshot.cgi, the Python script we use to automagically generate and serve snapshot tarballs, as reference. Hope someone finds these useful.. ;) Cheers -S --- ../gitweb/gitweb.cgi 2005-08-25 19:25:11.000000000 +0800 +++ gitweb.cgi 2005-08-25 20:33:50.000000000 +0800 @@ -40,6 +40,23 @@ #my $projects_list = $projectroot; my $projects_list = "index/index.aux"; +# custom stuff - mantis/commit tags integration +sub committags($){ + my $a = shift; + $a =~ s!BUG\(([0-9]*)\)!BUG($1)!g; + $a =~ s!FEATURE\(([0-9]*)\)!FEATURE($1)!g; + $a =~ s!RELEASE: (.*)!RELEASE: $1!g; + return $a; +} +sub committags_shortlog($$){ + my $a = shift; + my $href = shift; + $a =~ s!BUG\(([0-9]*)\)!BUG($1)!g; + $a =~ s!FEATURE\(([0-9]*)\)!FEATURE($1)!g; + $a =~ s!RELEASE: (.*)!RELEASE: $1!g; + return $a; +} + # input validation and dispatch my $action = $cgi->param('a'); if (defined $action) { @@ -655,7 +672,7 @@ $line =~ s/$hash_text/$link/; } } - return $line; + return committags($line); } sub date_str { @@ -979,7 +996,7 @@ "" . escapeHTML(chop_str($co{'author_name'}, 10)) . "\n" . "" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit", -class => "list"}, - "" . escapeHTML($co{'title_short'}) . "") . + "" . committags_shortlog(escapeHTML($co{'title_short'}), "$my_uri?p=$project;a=commit;h=$commit") . "") . "\n" . "" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit"}, "commit") . @@ -1977,7 +1994,7 @@ "

\n" . "\n"; print "
\n" . - $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" . + $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, committags(escapeHTML($co{'title'}))) . "\n" . "
\n"; print "
/$file_name
\n"; @@ -2004,7 +2021,7 @@ print "$co{'age_string_date'}\n" . "" . escapeHTML(chop_str($co{'author_name'}, 15, 3)) . "\n" . "" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit", -class => "list"}, "" . - escapeHTML(chop_str($co{'title'}, 50)) . "") . "\n" . + committags(escapeHTML(chop_str($co{'title'}, 50))) . "") . "\n" . "" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit"}, "commit") . " | " . $cgi->a({-href => "$my_uri?p=$project;a=blob;hb=$commit;f=$file_name"}, "blob"); @@ -2230,7 +2247,7 @@ print "$co{'age_string_date'}\n" . "" . escapeHTML(chop_str($co{'author_name'}, 10)) . "\n" . "" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit", -class => "list"}, "" . - escapeHTML($co{'title_short'}) . "") . "\n" . + committags_shortlog(escapeHTML($co{'title_short'}), "$my_uri?p=$project;a=commit;h=$commit") . "") . "\n" . "" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit"}, "commit") . " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$commit"}, "commitdiff") . --- ../gitweb/gitweb.cgi 2005-08-25 19:25:11.000000000 +0800 +++ gitweb.cgi 2005-08-26 17:56:41.000000000 +0800 @@ -40,6 +40,53 @@ #my $projects_list = $projectroot; my $projects_list = "index/index.aux"; +# custom stuff - refactored navbar +sub git_navbar($$$$) { + my $project = shift; + my $head = shift; + my $curSection = shift; + my $extraLinks = shift; + + my $sumLink = $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary"); + my $slogLink = $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog"); + my $logLink = $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log"); + my $comLink = $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$head"}, "commit"); + my $comdifLink = $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$head"}, "commitdiff"); + my $treeLink = $cgi->a({-href => "$my_uri?p=$project;a=tree"}, "tree"); + my $snapLink = $cgi->a({-href => "$snapshots_url?tree=$project&commit=HEAD"}, "latest snapshot"); + + if ($curSection eq "summary") { + $sumLink = "summary"; + } + elsif ($curSection eq "shortlog") { + $slogLink = "shortlog"; + } + elsif ($curSection eq "log") { + $logLink = "log"; + } + elsif ($curSection eq "commit") { + $comLink = "commit"; + } + elsif ($curSection eq "commitdiff") { + $comdifLink = "commitdiff"; + } + elsif ($curSection eq "tree") { + $treeLink = "tree"; + } + + my $retVal = "
\n" . + $sumLink . + " | " . $slogLink . + " | " . $logLink . + " | " . $comLink . + " | " . $comdifLink . + " | " . $treeLink . + " | " . $snapLink . + "
$extraLinks
\n" . + "
\n"; + return $retVal; +} + # input validation and dispatch my $action = $cgi->param('a'); if (defined $action) { @@ -941,15 +988,7 @@ } git_header_html(); - print "
\n" . - "summary". - " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$head"}, "commit") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$head"}, "commitdiff") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree"}, "tree") . - "

\n" . - "
\n"; + print git_navbar($project, $head, "summary", ""); print "
 
\n"; print "\n" . "\n" . @@ -1087,15 +1126,7 @@ sub git_tag { my $head = git_read_hash("$project/HEAD"); git_header_html(); - print "
\n" . - $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$head"}, "commit") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$head"}, "commitdiff") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;hb=$head"}, "tree") . "
\n" . - "
\n" . - "
\n"; + print git_navbar($project, $head, "tag", ""); my %tag = git_read_tag($hash); print "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($tag{'name'})) . "\n" . @@ -1126,15 +1157,7 @@ sub git_tags { my $head = git_read_hash("$project/HEAD"); git_header_html(); - print "
\n" . - $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$head"}, "commit") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$head"}, "commitdiff") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;hb=$head"}, "tree") . "
\n" . - "
\n" . - "
\n"; + print git_navbar($project, $head, "tags", ""); my $taglist = git_read_refs("refs/tags"); print "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=summary", -class => "title"}, " ") . @@ -1185,15 +1208,7 @@ sub git_branches { my $head = git_read_hash("$project/HEAD"); git_header_html(); - print "
\n" . - $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$head"}, "commit") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$head"}, "commitdiff") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;hb=$head"}, "tree") . "
\n" . - "
\n" . - "
\n"; + print git_navbar($project, $head, "branches", ""); my $taglist = git_read_refs("refs/heads"); print "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=summary", -class => "title"}, " ") . @@ -1263,15 +1278,7 @@ my $base = $file_name || ""; git_header_html(); if (defined $hash_base && (my %co = git_read_commit($hash_base))) { - print "
\n" . - $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base"}, "commit") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash_base"}, "commitdiff") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash_base"}, "tree") . "
\n"; - print $cgi->a({-href => "$my_uri?p=$project;a=blob_plain;h=$hash"}, "plain") . "
\n" . - "
\n"; + print git_navbar($project, $hash_base, "blob", $cgi->a({-href => "$my_uri?p=$project;a=blob_plain;h=$hash"}, "plain")); print "
" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base", -class => "title"}, escapeHTML($co{'title'})) . "
\n"; @@ -1331,15 +1338,7 @@ my $base = ""; if (defined $hash_base && (my %co = git_read_commit($hash_base))) { $base_key = ";hb=$hash_base"; - print "
\n" . - $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash_base"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash_base"}, "log") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base"}, "commit") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash_base"}, "commitdiff") . - " | tree" . - "

\n" . - "
\n"; + print git_navbar($project, $hash_base, "tree", ""); print "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base", -class => "title"}, escapeHTML($co{'title'})) . "\n" . "
\n"; @@ -1493,38 +1492,31 @@ $page = 0; } git_header_html(); - print "
\n"; - print $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash"}, "shortlog") . - " | log" . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$hash;hb=$hash"}, "tree") . "
\n"; + my $navExtra = ""; my $limit = sprintf("--max-count=%i", (100 * ($page+1))); open my $fd, "-|", "$gitbin/git-rev-list $limit $hash" or die_error(undef, "Open failed."); my (@revlist) = map { chomp; $_ } <$fd>; close $fd; if ($hash ne $head || $page) { - print $cgi->a({-href => "$my_uri?p=$project;a=log"}, "HEAD"); + $navExtra .= $cgi->a({-href => "$my_uri?p=$project;a=log"}, "HEAD"); } else { - print "HEAD"; + $navExtra .= "HEAD"; } if ($page > 0) { - print " ⋅ " . + $navExtra .= " ⋅ " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash;pg=" . ($page-1), -accesskey => "p", -title => "Alt-p"}, "prev"); } else { - print " ⋅ prev"; + $navExtra .= " ⋅ prev"; } if ($#revlist >= (100 * ($page+1)-1)) { - print " ⋅ " . + $navExtra .= " ⋅ " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash;pg=" . ($page+1), -accesskey => "n", -title => "Alt-n"}, "next"); } else { - print " ⋅ next"; + $navExtra .= " ⋅ next"; } - print "
\n" . - "
\n"; + print git_navbar($project, $hash, "log", $navExtra); if (!@revlist) { print "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=summary", -class => "title"}, " ") . @@ -1593,6 +1585,7 @@ @difftree = map { chomp; $_ } <$fd>; close $fd or die_error(undef, "Reading diff-tree failed."); git_header_html(); + # git_navbar omitted here - commitdiff link a bit weird o_O print "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") . " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash"}, "shortlog") . @@ -1773,16 +1766,7 @@ mkdir($git_temp, 0700); git_header_html(); if (defined $hash_base && (my %co = git_read_commit($hash_base))) { - print "
\n" . - $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base"}, "commit") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash_base"}, "commitdiff") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash_base"}, "tree") . - "
\n"; - print $cgi->a({-href => "$my_uri?p=$project;a=blobdiff_plain;h=$hash;hp=$hash_parent"}, "plain") . - "
\n"; + print git_navbar($project, $hash_base, "blobdiff", $cgi->a({-href => "$my_uri?p=$project;a=blobdiff_plain;h=$hash;hp=$hash_parent"}, "plain")); print "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base", -class => "title"}, escapeHTML($co{'title'})) . "\n" . "
\n"; @@ -1825,15 +1809,7 @@ close $fd or die_error(undef, "Reading diff-tree failed."); git_header_html(); - print "
\n" . - $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash"}, "log") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") . - " | commitdiff" . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") . "
\n"; - print $cgi->a({-href => "$my_uri?p=$project;a=commitdiff_plain;h=$hash;hp=$hash_parent"}, "plain") . "\n" . - "
\n"; + print git_navbar($project, $hash, "commitdiff", $cgi->a({-href => "$my_uri?p=$project;a=commitdiff_plain;h=$hash;hp=$hash_parent"}, "plain")); print "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" . "
\n"; @@ -1967,15 +1943,7 @@ die_error(undef, "Unknown commit object."); } git_header_html(); - print "
\n" . - $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") . - "

\n" . - "
\n"; + print git_navbar($project, $hash, "history", ""); print "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" . "
\n"; @@ -2051,15 +2019,7 @@ $pickaxe_search = 1; } git_header_html(); - print "
\n" . - $cgi->a({-href => "$my_uri?p=$project;a=summary;h=$hash"}, "summary") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash"}, "log") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") . - "

\n" . - "
\n"; + print git_navbar($project, $hash, "search", ""); print "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" . @@ -2180,38 +2140,31 @@ $page = 0; } git_header_html(); - print "
\n" . - $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") . - " | shortlog" . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash"}, "log") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$hash;hb=$hash"}, "tree") . "
\n"; my $limit = sprintf("--max-count=%i", (100 * ($page+1))); open my $fd, "-|", "$gitbin/git-rev-list $limit $hash" or die_error(undef, "Open failed."); my (@revlist) = map { chomp; $_ } <$fd>; close $fd; + my $navExtra = ""; if ($hash ne $head || $page) { - print $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "HEAD"); + $navExtra .= $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "HEAD"); } else { - print "HEAD"; + $navExtra .= "HEAD"; } if ($page > 0) { - print " ⋅ " . + $navExtra .= " ⋅ " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash;pg=" . ($page-1), -accesskey => "p", -title => "Alt-p"}, "prev"); } else { - print " ⋅ prev"; + $navExtra .= " ⋅ prev"; } if ($#revlist >= (100 * ($page+1)-1)) { - print " ⋅ " . + $navExtra .= " ⋅ " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash;pg=" . ($page+1), -accesskey => "n", -title => "Alt-n"}, "next"); } else { - print " ⋅ next"; + $navExtra .= " ⋅ next"; } - print "
\n" . - "
\n"; + print git_navbar($project, $hash, "shortlog", $navExtra); print "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=summary", -class => "title"}, " ") . "
\n"; --- ../gitweb/gitweb.cgi 2005-08-25 19:25:11.000000000 +0800 +++ gitweb.cgi 2005-08-26 17:50:57.000000000 +0800 @@ -40,6 +40,8 @@ #my $projects_list = $projectroot; my $projects_list = "index/index.aux"; +my $snapshots_url = "http://git.xmms.se/snapshot.cgi"; + # input validation and dispatch my $action = $cgi->param('a'); if (defined $action) { @@ -845,6 +847,7 @@ $cgi->a({-href => "$my_uri?p=$pr->{'path'};a=summary"}, "summary") . " | " . $cgi->a({-href => "$my_uri?p=$pr->{'path'};a=shortlog"}, "shortlog") . " | " . $cgi->a({-href => "$my_uri?p=$pr->{'path'};a=log"}, "log") . + " | " . $cgi->a({-href => "$snapshots_url?tree=$pr->{'path'}&commit=HEAD"}, "latest snapshot") . "\n" . "\n"; } @@ -984,6 +987,7 @@ "
\n" . ""; } else { @@ -1033,7 +1037,8 @@ print $cgi->a({-href => "$my_uri?p=$project;a=$tag{'reftype'};h=$tag{'refid'}"}, $tag{'reftype'}); if ($tag{'reftype'} eq "commit") { print " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$tag{'name'}"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$tag{'refid'}"}, "log"); + " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$tag{'refid'}"}, "log") . + " | " . $cgi->a({-href => "$snapshots_url?tree=$project&commit=$tag{'refid'}"}, "snapshot"); } print "\n" . ""; @@ -1172,7 +1177,8 @@ print $cgi->a({-href => "$my_uri?p=$project;a=$tag{'reftype'};h=$tag{'refid'}"}, $tag{'reftype'}); if ($tag{'reftype'} eq "commit") { print " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$tag{'name'}"}, "shortlog") . - " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$tag{'refid'}"}, "log"); + " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$tag{'refid'}"}, "log") . + " | " . $cgi->a({-href => "$snapshots_url?tree=$project&commit=$tag{'refid'}"}, "snapshot"); } print "\n" . ""; @@ -1545,6 +1551,7 @@ "
\n" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit"}, "commit") . " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$commit"}, "commitdiff") . + " | " . $cgi->a({-href => "$snapshots_url?tree=$project&commit=$commit"}, "snapshot") . "
\n" . "
\n" . "" . escapeHTML($co{'author_name'}) . " [$ad{'rfc2822'}]
\n" . @@ -1646,6 +1653,8 @@ "" . "\n"; } + print "". + ""; print "
description" . escapeHTML($descr) . "
" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit"}, "commit") . " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$commit"}, "commitdiff") . + " | " . $cgi->a({-href => "$snapshots_url?tree=$project&commit=$commit"}, "snapshot") . "
snapshot$hash
". "\n"; print "
\n"; @@ -2234,6 +2243,7 @@ "" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$commit"}, "commit") . " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$commit"}, "commitdiff") . + " | " . $cgi->a({-href => "$snapshots_url?tree=$project&commit=$commit"}, "snapshot") . "\n" . ""; }