Package: quilt
Version: 0.46-4
Severity: wishlist
Tags: patch

When you want to only send out part of a series, this is not
trivial with quilt. This patch adds a --select option to the
mail command to allow editing a copy of the series file before
sending mail so that only those patches you keep in that file
are sent.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.26-rc2-wl-dirty (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages quilt depends on:
ii  bzip2                   1.0.5-0.1        high-quality block-sorting file co
ii  diffstat                1.45-2           produces graph of changes introduc
ii  gawk [awk]              1:3.1.5.dfsg-4.1 GNU awk, a pattern scanning and pr
ii  gettext                 0.17-2           GNU Internationalization utilities
ii  mawk [awk]              1.3.3-11.1       a pattern scanning and text proces
ii  patch                   2.5.9-5          Apply a diff file to an original

quilt recommends no packages.

-- no debconf information
Subject: add --select option to mail command

When you want to only send out part of a series, this is not
trivial with quilt. This patch adds a --select option to the
mail command to allow editing a copy of the series file before
sending mail so that only those patches you keep in that file
are sent.
---
 quilt/mail.in |   23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

--- quilt-0.46.orig/quilt/mail.in       2008-05-15 12:35:28.000000000 +0200
+++ quilt-0.46/quilt/mail.in    2008-05-15 12:44:31.000000000 +0200
@@ -55,6 +55,9 @@ with a template for the introduction. Pl
 
 --to, --cc, --bcc
        Append a recipient to the To, Cc, or Bcc header.
+
+--select
+       Edit a copy of the series file to select patches to send.
 " "@DOCSUBDIR@/README.MAIL"
                exit 0
        else
@@ -94,7 +97,7 @@ process_mail()
 
 options=`getopt -o m:h --long from:,to:,cc:,bcc:,subject: \
                       --long send,mbox:,charset:,sender: \
-                      --long prefix: -- "$@"`
+                      --long select,prefix: -- "$@"`
 
 if [ $? -ne 0 ]
 then
@@ -134,6 +137,9 @@ do
        --send)
                opt_send=1
                shift ;;
+       --select)
+               opt_select=1
+               shift ;;
        --mbox)
                opt_mbox=$2
                shift 2 ;;
@@ -282,12 +288,21 @@ if [ "$(type -t quilt_mail_patch_filter 
        }
 fi
 
-patches=( $(cat_series) )
[EMAIL PROTECTED]
-
 tmpdir=$(gen_tempfile -d)
 trap "rm -rf $tmpdir" EXIT
 
+if [ -n "$opt_select" ] ; then
+       nser="$tmpdir/series"
+       cp "$SERIES" "$nser"
+       if ! $EDITOR "$nser" ; then
+               exit 1
+       fi
+       SERIES="$nser"
+fi
+
+patches=( $(cat_series) )
[EMAIL PROTECTED]
+
 for patch in "[EMAIL PROTECTED]"
 do
        mkdir -p "$tmpdir/$(dirname "$patch")"

Reply via email to