tags 382884 + patch
thanks

Hi,

On Mon, 2006-08-14 at 00:00 +0100, martin f krafft wrote:
> Package: devscripts
> Version: 2.9.20
> Severity: wishlist
> File: /usr/bin/tagpending
> 
> I often tag pending bugs confirmed as well. It would be nice if
> tagpending could take an option to set 'confirmed' as well.

Attached is a patch implementing this functionality.

Please consider applying it.

Regards,

Adam
--- devscripts-2.9.27.orig/tagpending.1	2006-11-08 16:22:41.000000000 +0000
+++ devscripts-2.9.27/tagpending.1	2007-02-20 23:13:22.000000000 +0000
@@ -24,6 +24,9 @@
 Do not query the BTS for already tagged bugs, that is, force all bugs to
 be tagged as pending even if they already are.
 .TP
+.BR \-c ". " \-\-confirm
+For each bug tagged as pending, also tag it as confirmed.
+.TP
 .BR \-h ", " \-\-help
 Show a brief usage message.
 .TP
--- devscripts-2.9.27.orig/tagpending.sh	2006-11-08 16:22:41.000000000 +0000
+++ devscripts-2.9.27/tagpending.sh	2007-02-20 23:13:50.000000000 +0000
@@ -28,6 +28,7 @@
     -v, --verbose       Verbose mode: List bugs checked/tagged. 
                         NOTE: Verbose and silent mode can't be used together.
     -f, --force         Do not query the BTS for already tagged bugs (force).
+    -c. --confirm       Tag bugs as confirmed as well as pending
     -h, --help          This usage screen.
     -V, --version       Display the version and copyright information
 
@@ -51,6 +52,7 @@
 DRY=0
 SILENT=0
 VERBOSE=0
+CONFIRM=0
 
 while [ -n "$1" ]; do
   case "$1" in
@@ -59,6 +61,7 @@
     -f|--force) USE_WGET=0; shift ;;
     -V|--version) version; exit 0 ;;
     -v|--verbose) VERBOSE=1; shift ;;
+    -c|--confirm) CONFIRM=1; shift ;;
     --help | -h) usage; exit 0 ;;
     *)
       echo "tagpending error: unrecognized option $1" >&2
@@ -131,7 +134,13 @@
 src_packages=$(awk '/Package: / { print $2 } /Source: / { print $2 }' debian/control | sort | uniq)
 
 if [ "$DRY" = 1 ]; then
-  msg="tagpending info: Would tag these bugs pending:"
+  msg="tagpending info: Would tag these bugs pending"
+
+  if [ "$CONFIRM" = 1 ]; then
+    msg="$msg and confirmed"
+  fi
+
+  msg="$msg:"
 
   for bug in $to_be_tagged; do
     msg="$msg $bug"
@@ -141,7 +150,13 @@
   exit 0
 else
   if [ "$SILENT" = 0 ]; then
-    msg="tagpending info: tagging these bugs pending:"
+    msg="tagpending info: tagging these bugs pending"
+
+    if [ "$CONFIRM" = 1 ]; then
+      msg="$msg and confirmed"
+    fi
+
+    msg="$msg:"
 
     for bug in $to_be_tagged; do
       msg="$msg $bug"
@@ -153,6 +168,10 @@
 
   for bug in $to_be_tagged; do
     BTS_ARGS="$BTS_ARGS . tag $bug + pending "
+
+    if [ "$CONFIRM" = 1 ]; then
+      BTS_ARGS="$BTS_ARGS confirmed"
+    fi
   done
 
   eval bts ${BTS_ARGS}

Reply via email to