]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
control.pl: Footer contains modified as well as new bugs
authorIan Campbell <ijc@hellion.org.uk>
Sun, 13 Jan 2013 19:37:14 +0000 (19:37 +0000)
committerIan Campbell <ijc@hellion.org.uk>
Sun, 13 Jan 2013 19:37:14 +0000 (19:37 +0000)
scripts/control.pl

index 3bd05276a13b0fbdb4a30f09e4d7df1fcb1e9827..c6328053e4ed8cbc2e91f409294fa31301c4f496 100755 (executable)
@@ -160,12 +160,12 @@ sub lookup_bugid ($) {
     my $b = shift;
 
     if ( $b > 0 ) {
-        $bugs{$b} = 1;
+        $bugs{$b} = 0 unless $bugs{$b};
         return Emesinae::Bug->new( $dbh, ID => $b );
     }
 
     die "Cannot resolve bug backreference $b" if -$b - 1 > $#bugs;
-    $bugs{ $bugs[ -$b - 1 ] } = 1;
+    $bugs{ $bugs[ -$b - 1 ] } = 0 unless $bugs{ $bugs[ -$b - 1 ] };
     return Emesinae::Bug->new( $dbh, ID => $bugs[ -$b - 1 ] );
 }
 
@@ -307,10 +307,10 @@ sub bugurl ($) {
     return "http://" . $c{TrackerHost} . "/cgi-bin/bug.pl?id=$bn";
 }
 
-push @reply, ( "", "Created New Bugs:" ) if %bugs;
+push @reply, ( "", "Modified/created Bugs:" ) if %bugs;
 
 foreach my $b ( sort keys %bugs ) {
-    push @reply, " - " . $b . ": " . bugurl($b);
+    push @reply, " - " . $b . ": " . bugurl($b) . ( $bugs{$b} ? " (new)" : "" );
 }
 
 # Footer