r77662 - /scripts/forward-patch
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Thu Jul 21 09:43:29 UTC 2011
Author: gregoa
Date: Thu Jul 21 09:43:26 2011
New Revision: 77662
URL: http://svn.debian.org/wsvn/?sc=1&rev=77662
Log:
allow to enter Subject via Term::ReadLine
Modified:
scripts/forward-patch
Modified: scripts/forward-patch
URL: http://svn.debian.org/wsvn/scripts/forward-patch?rev=77662&op=diff
==============================================================================
--- scripts/forward-patch (original)
+++ scripts/forward-patch Thu Jul 21 09:43:26 2011
@@ -2,6 +2,7 @@
use MIME::Lite;
use File::Basename;
+use Term::ReadLine;
use Proc::InvokeEditor;
use warnings;
@@ -36,9 +37,14 @@
die 'Err: Provide a valid patch file' if !$patch;
-my $subject = basename($patch);
-$subject =~ s/(\_|\-)/\ /g;
-$subject =~ s/(\.patch|\.diff)//;
+my $term = new Term::ReadLine 'forward-patch';
+my $subject = $term->readline('Subject>', '[PATCH] ');
+
+if ($subject eq '[PATCH] ') {
+ $subject .= basename($patch);
+ $subject =~ s/(\_|\-)/\ /g;
+ $subject =~ s/(\.patch|\.diff)//;
+}
if (!$dist) {
open my $dctrl, '<', 'debian/control'
More information about the Pkg-perl-cvs-commits
mailing list