This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
First pass at a tool to help porters apply RT patches from the
authorJesse Vincent <jesse@bestpractical.com>
Mon, 5 Jul 2010 11:26:52 +0000 (12:26 +0100)
committerJesse Vincent <jesse@bestpractical.com>
Mon, 5 Jul 2010 14:53:39 +0000 (16:53 +0200)
commandline

MANIFEST
Porting/rt_list_patches [new file with mode: 0755]

index 4e7c2c9..820fb78 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -4084,6 +4084,7 @@ Porting/README.y2038              Perl notes for the 2038 fix
 Porting/regcharclass.pl                Generate regcharclass.h from inline data
 Porting/release_managers_guide.pod     Release Manager's Guide
 Porting/release_schedule.pod   Schedule for future releases
+Porting/rt_list_patches     A tool to help you apply patches from RT
 Porting/sort_perldiag.pl       Keep our diagnostics orderly
 Porting/testall.atom           Cumulative profile with Third Degree
 Porting/thirdclean             Cleanup Third Degree reports
diff --git a/Porting/rt_list_patches b/Porting/rt_list_patches
new file mode 100755 (executable)
index 0000000..e8161fc
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+if [ -z "$RTUSER" ]; then
+    echo "You need to set the environment variable RTUSER to your rt.perl.org username"
+    exit
+fi
+
+if [ -z "$RTPASSWD" ]; then
+    echo "You need to set the environment variable RTPASSWD to your rt.perl.org password"
+    exit
+fi
+
+
+export RTSERVER=http://rt.perl.org/rt3
+
+if [ -z "$1"  ]; then
+    echo "$0 ticketid [patchid]"
+    exit
+fi
+
+if [ -z "$2" ]; then
+    rt show ticket/$1/attachments  |grep -v ":\s*(" |grep -v "^id"
+    exit
+fi
+
+rt show ticket/$1/attachments/$2/content