Author: adam-guest
Date: 2008-03-30 16:22:17 +0000 (Sun, 30 Mar 2008)
New Revision: 1224

Modified:
   trunk/debian/changelog
   trunk/scripts/tagpending.pl
Log:
tagpending: Allow the mail sent to the BTS to be displayed and (assuming
--noact is not in effect) confirmed before sending

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-03-29 18:11:34 UTC (rev 1223)
+++ trunk/debian/changelog      2008-03-30 16:22:17 UTC (rev 1224)
@@ -27,6 +27,8 @@
   * dscverify:
     + Add debian-maintainers to the default set of keyrings
     + Add a --no-default-keyrings option to override the default keyrings
+  * tagpending: Allow the mail sent to the BTS to be displayed and (assuming
+    --noact is not in effect) confirmed before sending
   * who-uploads: Mention the debian-maintainers keyring in --help
 
  -- Adam D. Barratt <[EMAIL PROTECTED]>  Tue, 25 Mar 2008 18:51:59 +0000

Modified: trunk/scripts/tagpending.pl
===================================================================
--- trunk/scripts/tagpending.pl 2008-03-29 18:11:34 UTC (rev 1223)
+++ trunk/scripts/tagpending.pl 2008-03-30 16:22:17 UTC (rev 1224)
@@ -37,6 +37,7 @@
 
 my ($opt_help, $opt_version, $opt_verbose, $opt_noact, $opt_silent);
 my ($opt_online, $opt_confirm, $opt_to, $opt_wnpp, $opt_comments);
+my $opt_interactive;
 
 # Default options
 $opt_silent = 0;
@@ -47,6 +48,7 @@
 $opt_wnpp = 0;
 $opt_to = '';
 $opt_comments = 1;
+$opt_interactive = 0;
 
 GetOptions("help|h" => \$opt_help,
           "version" => \$opt_version,
@@ -58,6 +60,7 @@
           "confirm|c" => \$opt_confirm,
           "to|t=s" => \$opt_to,
           "wnpp|w" => \$opt_wnpp,
+          "interactive|i" => \$opt_interactive,
            )
     or die "Usage: $progname [options]\nRun $progname --help for more 
details\n";
 
@@ -129,6 +132,11 @@
 
 Equivalent to dpkg-parsechangelog's -v option.
 
+=item -i, --interactive
+
+Display the message which would be sent to the BTS and, except when
+--noact was used, prompt for confirmation before sending it.
+
 =item -w, --wnpp
 
 For each bug that does not appear to belong to the current package, 
@@ -289,7 +297,7 @@
 my %packages = map { $_ => 1 } @sourcepkgs;
 my @bts_args = ("bts");
 
-if ($opt_noact) {
+if ($opt_noact and not $opt_interactive) {
     bugs_info;
     bugs_info "wnpp" if $opt_wnpp;
 } else {
@@ -298,6 +306,15 @@
        bugs_info "wnpp" if $opt_wnpp;
     }
 
+    if ($opt_interactive) {
+       if ($opt_noact) {
+           push(@bts_args, "-n");
+           print "\nWould send this BTS mail:\n\n";
+       } else {
+           push(@bts_args, "-i");
+       }
+    }
+
     if (@to_tag) {
        push(@bts_args, "package", join " ", keys(%packages));
 
@@ -389,6 +406,9 @@
     -t, --to <version>  Use changelog information from all versions strictly
                        later than <version> (mimics dpkg-parsechangelog's
                        -v option.)
+    -i, --interactive   Display the message which would be sent to the BTS
+                       and, except if --noact was used, prompt for
+                       confirmation ebfore sending it.
     -w, --wnpp          For each potentially not owned bug, check whether
                        it is filed against wnpp and, if so, tag it. This
                        allows e.g. ITA or ITPs to be tagged.



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to