[Pkg-libvirt-commits] [libguestfs] 12/54: podwrapper: Recognize git-style dates in ChangeLog

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 9 11:21:15 UTC 2014


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

bengen pushed a commit to branch debian
in repository libguestfs.

commit 2335152215f5d263776fb05e3d1a97a59d646355
Author: Hilko Bengen <bengen at hilluzination.de>
Date:   Fri Feb 14 09:09:47 2014 +0100

    podwrapper: Recognize git-style dates in ChangeLog
    
    (cherry picked from commit bbfb9f9480baf3bbf62c6a07252bad9030bdc4a1)
---
 podwrapper.pl.in | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/podwrapper.pl.in b/podwrapper.pl.in
index 9bceec3..61d5e12 100755
--- a/podwrapper.pl.in
+++ b/podwrapper.pl.in
@@ -235,9 +235,17 @@ my $date;
 my $filename = "$abs_top_srcdir/ChangeLog";
 if (-r $filename) {
     open FILE, $filename or die "$progname: $filename: $!";
-    $_ = <FILE>;
+    while (<FILE>) {
+        if (/^Date:\s+...\s+(...)\s+(\d+)\s+..:..:..\s+(\d{4})\s+.*$/) {
+            my $i = 0;
+            my %month =
+              map { $_ => ++$i }
+                (qw< Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec >);
+            $date = sprintf '%04d-%02d-%02d', $3, $month{$1}, $2;
+            last;
+        }
+    }
     close FILE;
-    $date = $1 if /^(\d+-\d+-\d+)\s/;
 }
 $filename = "$abs_top_srcdir/.git";
 if (!$date && -d $filename) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list