--- ../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 @@ "" . $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" . ""; } 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 "snapshot". + "$hash"; print "". "\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" . ""; }