1 |
|
#!/usr/bin/perl -w |
2 |
|
|
3 |
+ |
# TODO: remove tables, and use CSS instead |
4 |
+ |
|
5 |
|
use CGI; |
6 |
|
$query=new CGI; |
7 |
|
my($period)=$query->param('period'); |
46 |
|
$modulelist =~ s/[\r\n]/ /gm; |
47 |
|
|
48 |
|
my($cvs2clpath) = "/usr/local/bin/cvs2cl"; |
49 |
< |
my($cvs2clargs) = "--stdout --no-wrap -r -t -w -S -U $cvsroot/CVSROOT/users -l \"-d'$firstdate'\" -g \"-d$cvsroot\" -g \"-Q\""; |
49 |
> |
my($cvs2clargs) = "--stdout --no-wrap --no-common-dir -r -t -w -S -U $cvsroot/CVSROOT/users -l \"-d'$firstdate'\" -g \"-d$cvsroot\" -g \"-Q\""; |
50 |
|
my($updatecmd) = "/home/iscream/bin/fullcvsupdate.sh $modulelist"; |
51 |
|
my($logcmd) = "cd /tmp/i-scream/cvstmp && $cvs2clpath $cvs2clargs"; |
52 |
|
|
53 |
< |
my ($left) = "../htdocs/left.inc" ; |
54 |
< |
my ($title) = "../htdocs/title.inc"; |
55 |
< |
my ($bottom) = "../htdocs/bottom.inc"; |
53 |
> |
my ($menu) = "../nwww/menu.inc" ; |
54 |
> |
my ($header) = "../nwww/header.inc"; |
55 |
> |
my ($footer) = "../nwww/footer.inc"; |
56 |
> |
my ($style) = "../nwww/style.inc"; |
57 |
|
|
58 |
|
print "Content-type: text/html\n\n"; |
59 |
|
|
60 |
|
print <<"END"; |
61 |
< |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
61 |
> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
62 |
> |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
63 |
|
|
64 |
|
<html> |
65 |
|
|
66 |
|
<head> |
67 |
< |
<title>The i-scream Project Commit Log</title> |
64 |
< |
</head> |
65 |
< |
|
66 |
< |
<body bgcolor="#ffffff" link="#0000ff" alink="#3333cc" vlink="#3333cc" text="#000066"> |
67 |
< |
|
68 |
< |
<table border="0" cellpadding="2" cellspacing="2"> |
69 |
< |
<tr> |
70 |
< |
<td valign="top"> |
67 |
> |
<title>i-scream CVS Commit Logs</title> |
68 |
|
END |
69 |
|
|
70 |
< |
&print_html($left); |
70 |
> |
&print_html($style); |
71 |
|
|
72 |
|
print <<"END"; |
73 |
< |
</td> |
74 |
< |
<td valign="top"> |
73 |
> |
</head> |
74 |
> |
|
75 |
> |
<body> |
76 |
> |
|
77 |
> |
<div id="container"> |
78 |
> |
|
79 |
> |
<div id="main"> |
80 |
|
END |
81 |
|
|
82 |
< |
&print_html($title); |
82 |
> |
&print_html($header); |
83 |
|
|
84 |
|
print <<"END"; |
85 |
+ |
<div id="contents"> |
86 |
+ |
<h1 class="top">i-scream CVS Commit Logs</h1> |
87 |
+ |
|
88 |
|
<h2>$heading</h2> |
89 |
|
END |
90 |
|
|
95 |
|
foreach my $module (@modules) { |
96 |
|
|
97 |
|
print "<table border=\"0\" bgcolor=\"#000066\" cellpadding=\"5\" width=\"100%\">\n\n"; |
98 |
< |
print "<tr><td>\n<font size=\"4\"><b><a href=\"http://cvs.i-scream.org/$module\" style=\"color: white\">$module module</a></b></font>\n</td></tr>\n\n"; |
98 |
> |
print "<tr><td>\n<font size=\"4\"><b><a href=\"http://cvs.i-scream.org/$module/\" style=\"color: white\">$module module</a></b></font>\n</td></tr>\n\n"; |
99 |
|
print "<tr><td bgcolor=\"white\">\n"; |
100 |
|
|
101 |
|
my(@lines) = `$logcmd $module 2>&1`; |
121 |
|
print HTML_encode("$2"); |
122 |
|
print "</i>\n</font>\n" |
123 |
|
} |
124 |
< |
elsif($line =~ /(\S+) (\(\S+\))([,:])/ || $line =~ /(\S+) (\(\S+,\s+\S+\))([,:])/) { |
125 |
< |
my ($file, $rest, $ext) = ($1, $2, $3); |
124 |
> |
elsif($line =~ /([^\s]+) (\([^,^\)]+(,[^\)]+)?\))([,:])/) { |
125 |
> |
my ($file, $rev, $tags, $ext) = ($1, $2, $3, $4); |
126 |
|
print "<code>"; |
127 |
|
print "<a href=\"http://cvs.i-scream.org/$file\" style=\"text-decoration: none;\">"; |
128 |
|
print HTML_encode($file); |
129 |
|
print "</a> "; |
130 |
< |
if($rest =~ /\((\S+)\.(\d+)(.*)\)/) { |
130 |
> |
if($rev =~ /\(([^\s]+)\.(\d+)(.*)\)/) { |
131 |
|
my $start = $1; |
132 |
|
my $end = $2; |
133 |
|
my $other = $3; |
150 |
|
print HTML_encode("$other)"); |
151 |
|
} |
152 |
|
else { |
153 |
< |
print HTML_encode($rest); |
153 |
> |
print HTML_encode($rev); |
154 |
|
} |
155 |
|
} |
156 |
|
else { |
157 |
< |
print HTML_encode($rest); |
157 |
> |
print HTML_encode($rev); |
158 |
|
} |
159 |
|
print HTML_encode($ext); |
160 |
< |
print "</code><br>\n" |
160 |
> |
print "</code><br/>\n" |
161 |
|
} |
162 |
|
else { |
163 |
< |
chop $line; |
163 |
> |
chomp $line; |
164 |
|
print "<code>"; |
165 |
|
print HTML_encode($line); |
166 |
< |
print "</code><br>\n" |
166 |
> |
print "</code><br/>\n" |
167 |
|
} |
168 |
|
} |
169 |
|
} |
172 |
|
print "</table><p>\n\n"; |
173 |
|
} |
174 |
|
|
175 |
< |
&print_html($bottom); |
175 |
> |
print "</div>"; |
176 |
|
|
177 |
< |
print <<"END"; |
177 |
> |
&print_html($footer); |
178 |
|
|
179 |
< |
</td> |
175 |
< |
</tr> |
176 |
< |
</table> |
179 |
> |
print "</div>"; |
180 |
|
|
181 |
< |
</body> |
181 |
> |
&print_html($menu); |
182 |
|
|
183 |
+ |
print <<"END"; |
184 |
+ |
</div> |
185 |
+ |
|
186 |
+ |
</body> |
187 |
|
</html> |
188 |
|
END |
189 |
|
|