This is an automated email from the git hooks/post-receive script.

alexm-guest pushed a commit to branch fallback-for-github-pull-requests
in repository pkg-perl-tools.

commit b3100a03e2515db5516103c32d1287380d49a23c
Author: Alex Muntada <al...@alexm.org>
Date:   Sat Dec 3 04:39:41 2016 +0100

    Save patch name in Debian::PkgPerl::Patch
---
 lib/Debian/PkgPerl/Patch.pm | 2 ++
 t/patch.t                   | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/Debian/PkgPerl/Patch.pm b/lib/Debian/PkgPerl/Patch.pm
index 1326b27..b6182d7 100644
--- a/lib/Debian/PkgPerl/Patch.pm
+++ b/lib/Debian/PkgPerl/Patch.pm
@@ -38,6 +38,8 @@ sub retrieve_patch_info {
     my $patch     = $self->{patch};
     my $opt_force = $self->{force};
 
+    $patch_info{patch} = $patch;
+
     open( my $in, "<", $patch );
     my $line_no = 1;
     while ( $line_no <= 10 ) {
diff --git a/t/patch.t b/t/patch.t
index 6d61168..fbe6e22 100644
--- a/t/patch.t
+++ b/t/patch.t
@@ -20,10 +20,11 @@ my $patch = 
"$ENV{DPT_PACKAGES}/pkg-perl-tools/t/dummy.txt.patch";
 my $bug = new_ok( 'Debian::PkgPerl::Patch', [ patch => $patch ] );
 
 my %info = $bug->retrieve_patch_info();
+ok( exists $info{patch}, "retrieve patch name" );
+is( $info{patch}, $patch, "verify patch name" );
 ok( exists $info{Subject}, "retrieve patch info" );
 like( $info{Subject}, qr/\w+/, "subject in patch is not empty" );
-note("Subject: $info{Subject}");
 like( $info{From}, qr/\w+/, "from in patch is not empty" );
-note("From: $info{From}");
 
+note("$info{patch} ($info{Subject}) by $info{From}");
 done_testing();

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to