#!/usr/bin/perl use strict; use CGI; my($result, $LIST, $COMMENT, $path, $dir, $line, @sb, %colors, $state, $count); $result = new CGI(); print $result->header; $path = "/home/httpd/html/"; $dir = $result->param('dir'); $colors{"Unknown"} = "yellow"; # Unknown state $colors{"Obsolete"} = ""; $colors{"Ready"} = "6699CC"; $colors{"Included"} = "CC33CC"; $colors{"Included Tweaking"} = "FF9900"; $colors{"Rejected"} = "red"; $colors{"LKML Waiting"} = "000066"; $colors{"LKML Tweaking"} = "FF6600"; $colors{"LKML Accepted"} = "006600"; $colors{"LJML Waiting"} = "000099"; $colors{"LJML Tweaking"} = "FF9900"; $colors{"LJML Accepted"} = "009900"; $colors{"Trivial Waiting"} = "0000CC"; $colors{"Trivial Tweaking"} = "FFCC00"; $colors{"Trivial Accepted"} = "00CC00"; $colors{"Maintainer Waiting"} = "0000FF"; $colors{"Maintainer Tweaking"} = "FFFF00"; $colors{"Maintainer Accepted"} = "00FF00"; print "This page tracks the current status of the patches I have submitted to the linux kernel. It's really for my own reference, but if you want to peruse, then so be it...

\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
 WaitingTweakingAccepted
LKML".getCount("LKML Waiting")."".getCount("LKML Tweaking")."".getCount("LKML Accepted")."
LJML".getCount("LJML Waiting")."".getCount("LJML Tweaking")."".getCount("LJML Accepted")."
Trivial".getCount("Trivial Waiting")."".getCount("Trivial Tweaking")."".getCount("Trivial Accepted")."
Maintainer".getCount("Maintainer Waiting")."".getCount("Maintainer Tweaking")."".getCount("Maintainer Accepted")."


\n"; print "\n"; print "\n"; print "
ObsoleteRejectedReadyIncludedUnknown
".getCount("Obsolete"). "".getCount("Rejected"). "".getCount("Ready"). "".getCount("Included"). " 


\n"; ##################### print ""; print ""; $line = 1; $count = 0; open LIST, "find $path/$dir -type f | sort | grep -v state | grep -v comments | grep -v mail | grep -v backup |"; while(){ chomp; s/$path\/$dir\///; $count++; # The name of the patch print ""; # The creation date of the patch @sb = stat("$path/$dir/$_"); print ""; # Status of the patch if(! -f "$path/$dir/$_-state"){ print ""; } else{ $state=`cat $path/$dir/$_-state`; chomp $state; print ""; } if(! -f "$path/$dir/$_-comments"){ print ""; } else{ if(`cat $path/$dir/$_-comments | wc -l | tr -d " "` > 6){ print "\n"; } else{ print ""; close COMMENT; } } print "\n"; } print "
PatchModified DateStatusComments
$_".localtime($sb[9])."Unknown$stateComments"; open COMMENT, "< $path/$dir/$_-comments"; while(){ s//>/g; if(/^[ \t]*>(.*)/){ $_ = "
$1"; } s/@/ [at] /g; s/From:(.*)/From:$1<\/i>
/g; s/^[ \t]*$/

/g; s/<pre>/
/g;
		s/<\/pre>/<\/pre>/g;
		print $_;
	    }
	    print "

"; print "

($count patches)

"; print "


This page is generated by patchtrack. Patchtrack is copyright Michael Still (mikal\@stillhq.com) 2002, and is released under the terms of the GNU GPL."; exit; ################################## sub getCount(){ my($find) = @_; return `find $path/$dir -type f -name "*-state" -exec grep "$find" {} \\; | wc -l`; }