]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Finish deprecating quit in Debbugs::Status
authorDon Armstrong <don@donarmstrong.com>
Mon, 9 Jun 2008 16:03:20 +0000 (09:03 -0700)
committerDon Armstrong <don@donarmstrong.com>
Mon, 9 Jun 2008 16:03:20 +0000 (09:03 -0700)
 * Add bug_num to status output

Debbugs/Status.pm

index 73a1dbc108f9d7af6d844a0120ed06e5d35c2de3..020e4c18ddf13022b63f0010150eb13289e18f92 100644 (file)
@@ -193,7 +193,10 @@ sub read_bug{
     }
 
     # Version 3 is the latest format version currently supported.
-    return undef if $version > 3;
+    if ($version > 3) {
+        warn "Unsupported status version '$version'";
+        return undef;
+    }
 
     my %namemap = reverse %fields;
     for my $line (@lines) {
@@ -226,6 +229,7 @@ sub read_bug{
     # Add log last modified time
     $data{log_modified} = (stat($log))[9];
     $data{location} = $location;
+    $data{bug_num} = $param{bug};
 
     return \%data;
 }
@@ -369,17 +373,17 @@ sub writebug {
     for my $version (keys %outputs) {
         next if defined $minversion and $version < $minversion;
         my $status = getbugcomponent($ref, $outputs{$version}, $location);
-        &quit("can't find location for $ref") unless defined $status;
-        open(S,"> $status.new") || &quit("opening $status.new: $!");
+        die "can't find location for $ref" unless defined $status;
+        open(S,"> $status.new") || die "opening $status.new: $!";
         print(S makestatus($data, $version)) ||
-            &quit("writing $status.new: $!");
-        close(S) || &quit("closing $status.new: $!");
+            die "writing $status.new: $!";
+        close(S) || die "closing $status.new: $!";
         if (-e $status) {
             $change = 'change';
         } else {
             $change = 'new';
         }
-        rename("$status.new",$status) || &quit("installing new $status: $!");
+        rename("$status.new",$status) || die "installing new $status: $!";
     }
 
     # $disablebughook is a bit of a hack to let format migration scripts use