--- globals.pl.orig	7 Feb 2003 10:30:01 -0000
+++ globals.pl	6 May 2003 11:09:09 -0000
@@ -1127,6 +1131,61 @@
     return $comp;
 }
 
+sub GetCommitLinks {
+    my ($text) = (@_);
+    return $text unless $text;
+
+#    print "<br>$text\n";
+#    return $text;
+
+    my $cvsurl = "http://cvs.example.com";
+    my $res = "";
+
+    my @foo = split("\n", $text);
+    shift @foo;
+    my $i;
+
+    $res = "\n<table cellspacing=0 cellpadding=\"0\">";
+    foreach $i (@foo) {
+
+        my $rev = reverse $i;
+        my @entry = split(/\s+/, $rev, 3);
+        my $fname = reverse $entry[2];
+        my $rev1 = reverse $entry[1];
+        my $rev2 = reverse $entry[0];
+
+        $fname =~ s~^\s*~~g;
+
+        my $filelink = "<a href=\"$cvsurl/$fname\">$fname</a>";
+
+        my $rev1link;
+        my $rev2link;
+        my $difflink;
+        my $style = 'style="padding-left: 6mm"';
+
+        if ($rev1 =~ /NONE/) {
+            $rev1link = "NONE (added)";
+            $rev2link = "<a href=\"$cvsurl/*checkout*/$fname?rev=$rev2\">$rev2</a>";
+            $difflink = "<em>No diff</em>";
+        } elsif ($rev2 =~ /NONE/) {
+            $rev1link = "<a href=\"$cvsurl/*checkout*/$fname?rev=$rev1\">$rev1</a>";
+            $rev2link = "NONE (removed)";
+            $difflink = "<em>No diff</em>";
+        } else {
+            $rev1link = "<a href=\"$cvsurl/*checkout*/$fname?rev=$rev1\">$rev1</a>";
+            $rev2link = "<a href=\"$cvsurl/*checkout*/$fname?rev=$rev2\">$rev2</a>";
+            $difflink = "<a href=\"$cvsurl/$fname.diff?r1=$rev1&r2=$rev2\">View diff</a>";
+        }
+
+        $res = "$res <tr>\n<td>$filelink</td> <td $style>$rev1link</td> <td $style>$rev2link</td> <td $style>$difflink</td></tr>\n";
+    }
+
+    $res = "$res </table>\n";
+
+    return $res;
+}
+
+
 # This routine quoteUrls contains inspirations from the HTML::FromText CPAN
 # module by Gareth Rees <garethr@cre.canon.co.uk>.  It has been heavily hacked,
 # all that is really recognizable from the original is bits of the regular
@@ -1180,6 +1239,11 @@
     # THIS MEANS THAT A LITERAL ", <, >, ' MUST BE ESCAPED FOR A MATCH
 
     $text = html_quote($text);
+
+    $text =~ s~(?<=FILES\ CHECKED\ IN:)
+                (.*)
+                ~GetCommitLinks($1)
+                ~egsx;
 
     # mailto:
     # Use |<nothing> so that $1 is defined regardless
