2 # vim: ts=4 sw=4 nowrap
4 # Compare two buglist status-files
10 $Version = "BugDiff 1.0\nCopyright (C) Wichert Akkerman <wakkerma\@debian.org>\n";
22 $0 [-V] [-h] [-H] <status1> <status2>
25 -h show some (hopefully) helpfull information
26 -H produce HTML output
27 -n list newly opened bugs
37 print "<h2>Closed/downgraded release-critical bugs</h2>\n";
39 for $p (sort keys %removed) {
40 print " <li><em>" . &wwwname($p) . ":</em>\n";
41 for $b (sort split(/ /, $removed{$p})) {
42 print &wwwnumber($b) . " ";
49 print "Closed/downgraded release-critical bugs:\n" if (%removed>0);
50 for $p (sort keys %removed) {
52 print join(", ", sort split(/ /, $removed{$p}));
62 print "<h2>Opened/upgraded release-critical bugs</h2>\n";
64 for $p (sort keys %new) {
65 print " <li><em>" . &wwwname($p) . ":</em>\n";
66 for $b (sort split(/ /, $new{$p})) {
67 print &wwwnumber($b) . " ";
74 print "Opened/upgraded release-critical bugs:\n" if (%new);
75 for $p (sort keys %new) {
77 print join(", ", sort split(/ /, $new{$p}));
85 print "<STRONG>" . ($closed ? $closed : "NO") . "</STRONG> release-critical bugs were closed and ";
86 print "<STRONG>" . ($opened ? $opened : "NONE") . "</STRONG> were opened.<P>\n";
88 print "" . ($closed ? $closed : "NO") . " release-critical bugs were closed ";
89 print "and " . ($opened ? $opened : "NONE") . " were opened.\n\n";
94 ShowUsage if ($opt_h or ($#ARGV != 1));
95 ShowVersion if ($opt_V);
98 &readstatus($ARGV[0]);
99 %oldbugs=%packagelist;
102 &readstatus($ARGV[1]);
105 for $p (keys %oldbugs) {
106 for $b (split(/ /, $oldbugs{$p})) {
107 if (not ($packagelist{$p} =~ m/\b$b\b/)) {
108 $removed{$p} .= "$b ";
115 for $p (keys %packagelist) {
116 for $b (split(/ /, $packagelist{$p})) {
117 if (not ($oldbugs{$p} =~ m/\b$b\b/)) {
124 statistics if ($opt_s);
125 closedbugs if ($opt_c);
126 openedbugs if ($opt_n);