SVN devscripts commit: r531 - in trunk: debian scripts

Stefano Zacchiroli zack at alioth.debian.org
Sat Feb 24 12:52:07 CET 2007


Author: zack
Date: 2007-02-24 12:52:06 +0100 (Sat, 24 Feb 2007)
New Revision: 531

Modified:
   trunk/debian/changelog
   trunk/scripts/tagpending.1
   trunk/scripts/tagpending.sh
Log:
added -c flag to tagpending, for tagging bugs also as confirmed

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2007-02-24 11:31:42 UTC (rev 530)
+++ trunk/debian/changelog	2007-02-24 11:52:06 UTC (rev 531)
@@ -30,10 +30,13 @@
     + debian/{dirs,links}: delegated directory/symlink creation to dh_link
     + debian/manpages: delegated manpage installation to dh_installman
     + scripts/Makefile: removed the need of explicitly listing scripts
-  * dd-list: enable output of binary package names, patch from Frank Küster
-    (Closes: #403207)
+  * dd-list: enable (-b cmdline flag) output of binary package names, patch
+    from Frank Küster (Closes: #403207)
+  * tagpending: enable (-c cmdline flag) tagging bugs as confirmed in addition
+    to tagging them as pending, patch from Adam D. Barratt (Closes: #382884)
+  * tagpending: factorized some code for delivering info to the user
 
- -- Stefano Zacchiroli <zack at debian.org>  Sat, 24 Feb 2007 12:13:56 +0100
+ -- Stefano Zacchiroli <zack at debian.org>  Sat, 24 Feb 2007 12:50:52 +0100
 
 devscripts (2.9.27) unstable; urgency=low
 

Modified: trunk/scripts/tagpending.1
===================================================================
--- trunk/scripts/tagpending.1	2007-02-24 11:31:42 UTC (rev 530)
+++ trunk/scripts/tagpending.1	2007-02-24 11:52:06 UTC (rev 531)
@@ -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

Modified: trunk/scripts/tagpending.sh
===================================================================
--- trunk/scripts/tagpending.sh	2007-02-24 11:31:42 UTC (rev 530)
+++ trunk/scripts/tagpending.sh	2007-02-24 11:52:06 UTC (rev 531)
@@ -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
@@ -130,29 +133,36 @@
 # Could use dh_listpackages, but no guarantee that it's installed.
 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:"
+bugs_info() {
+  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"
   done
   echo $msg | fold -w 78 -s
+}
 
+if [ "$DRY" = 1 ]; then
+  bugs_info
+
   exit 0
 else
   if [ "$SILENT" = 0 ]; then
-    msg="tagpending info: tagging these bugs pending:"
-
-    for bug in $to_be_tagged; do
-      msg="$msg $bug"
-    done
-    echo $msg | fold -w 78 -s
+    bugs_info
   fi
 
   BTS_ARGS="package $src_packages"
 
   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}




More information about the Devscripts-devel mailing list