--- ../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") .
|