ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/web/cgi-bin/cvslog.cgi
(Generate patch)

Comparing web/cgi-bin/cvslog.cgi (file contents):
Revision 1.6 by tdb, Tue Jun 5 17:20:12 2001 UTC vs.
Revision 1.15 by tdb, Fri Jun 15 16:11:17 2001 UTC

# Line 24 | Line 24 | else {
24     $heading = "Today's i-scream CVS commits";
25   }
26  
27 < print "Content-type: text/html\n\n";
27 > my($cvsroot) = "/cvs/i-scream";
28  
29 < my($cvs) = "/usr/bin/cvs";
29 > my($modulelist)=$query->param('module');
30 > $modulelist = `ls $cvsroot` unless defined $modulelist;
31 >
32   my($cvs2clpath) = "/home/sites/www.i-scream.org.uk/bin/cvs2cl.pl";
33 < my($cvsroot) = "/cvs/i-scream";
34 < my($cvs2clargs) = "--stdout -r -b -t -w -U $cvsroot/CVSROOT/users -l \"-d'\>$firstdate'\" -g \"-d$cvsroot\" -g \"-Q\"";
33 < my($updatecmd) = "/home/sites/www.i-scream.org.uk/bin/fullcvsupdate.sh";
33 > my($cvs2clargs) = "--stdout -r -b -t -w -S -U $cvsroot/CVSROOT/users -l \"-d'\>$firstdate'\" -g \"-d$cvsroot\" -g \"-Q\"";
34 > my($updatecmd) = "/home/sites/www.i-scream.org.uk/bin/fullcvsupdate.sh $modulelist";
35   my($logcmd) = "cd /home/sites/www.i-scream.org.uk/cvsscripttemp && $cvs2clpath $cvs2clargs";
36  
37 + my ($left) = "../left.inc" ;
38 + my ($title) = "../title.inc";
39 + my ($bottom) = "../bottom.inc";
40 +
41 + print "Content-type: text/html\n\n";
42 +
43   print <<"END";
44   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
45  
46   <html>
47  
48   <head>
49 < <title>The i-scream Project Daily Commit Log</title>
49 > <title>The i-scream Project Commit Log</title>
50   </head>
51  
52   <body bgcolor="#ffffff" link="#0000ff" alink="#3333cc" vlink="#3333cc" text="#000066">
53  
54 < <a href="http://www.i-scream.org.uk"><img border="0" src="../i-scream.gif"></a>
54 > <table border="0" cellpadding="2" cellspacing="2">
55 > <tr>
56 >  <td valign="top">
57 > END
58  
59 < <h2>$heading</h2>
59 > &print_html($left);
60  
61 + print <<"END";
62 +  </td>
63 +  <td valign="top">
64   END
65  
66 + &print_html($title);
67 +
68 + print <<"END";
69 + <h2>$heading</h2>
70 + END
71 +
72   print `$updatecmd`;
73  
55 my $modulelist = `ls $cvsroot`;
74   my(@modules) = split (/\s+/, $modulelist);
75  
76   foreach my $module (@modules) {
77  
78 <    print "<p><h3>$module module</h3>\n";
79 <    print "<a href=\"/cgi-bin/cvs/viewcvs.cgi/$module\">";
80 <    print "Browse i-scream &quot;$module&quot; cvs module</a>\n";
63 <    print "<pre>\n";
78 >    print "<table border=\"0\" bgcolor=\"#000066\" cellpadding=\"5\" width=\"100%\">\n\n";
79 >    print "<tr><td>\n<font size=\"4\"><b><a href=\"/cgi-bin/cvs/viewcvs.cgi/$module\" style=\"color: white\">$module module</a></b></font>\n</td></tr>\n\n";
80 >    print "<tr><td bgcolor=\"white\">\n";
81  
82      my(@lines) = `$logcmd $module 2>&1`;
83      if(@lines == 0) {
84 <        print "There have been no commits in this module during this period.";
84 >        print "There have been no commits in this module during this period.\n";
85      }
86      else {
87          foreach my $line (@lines) {
88 <            print HTML_encode($line);
88 >
89 >            if ($line =~ /^([0-9]{4}-[0-9]{2}-[0-9]{2}.*?)([^\s]+)$/) {
90 >                print "\n<font color=\"blue\"><b>";
91 >                print HTML_encode($1);
92 >                print "</b><i>";
93 >                print HTML_encode("by $2");
94 >                print "</i></font>\n"
95 >            }
96 >            else {
97 >                chop $line;
98 >                print "<code>";
99 >                print HTML_encode($line);
100 >                print "</code><br>\n"
101 >            }
102          }
103      }
104 +    print "</td></tr>\n";
105  
106 <    print "</pre></p>\n\n";
106 >    print "</table><p>\n\n";
107   }
108  
109 + &print_html($bottom);
110 +
111   print <<"END";
112 +
113 +  </td>
114 + </tr>
115 + </table>
116 +
117   </body>
118  
119   </html>
# Line 96 | Line 134 | sub HTML_encode ($){
134      $encoded =~ s/</&lt;/g;
135      $encoded =~ s/>/&gt;/g;
136      return $encoded;
137 + }
138 +
139 + # Print a file without escaping HTML: -
140 + sub print_html ($) {
141 +    my ($filename) = @_;
142 +    print `cat $filename 2>&1`;
143   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines