From 3abb969bd1a48e02df64bb8f5920cf84dab2763d Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 4 Aug 2011 16:18:32 +0200 Subject: [PATCH] Tweak git2changelog script --- bacula/release/git2changelog.pl | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/bacula/release/git2changelog.pl b/bacula/release/git2changelog.pl index 6b8b74c96e..379e2a4bd7 100755 --- a/bacula/release/git2changelog.pl +++ b/bacula/release/git2changelog.pl @@ -13,8 +13,6 @@ use strict; use POSIX q/strftime/; my $d=''; -my $cur; -my %elt; my $last_txt=''; my %bugs; my $refs = shift || ''; @@ -26,8 +24,6 @@ while (my $l = ) { next if ($l =~ /(tweak|typo|cleanup|regress:|again|.gitignore|fix compilation|technotes)/ixs); next if ($l =~ /update (version|technotes|kernstodo|projects|releasenotes|version|home|release|todo|notes|changelog|tpl|configure)/i); - next if ($l =~ /bacula-web:/); - if ($for_bweb) { next if ($l !~ /bweb/ixs); $l =~ s/bweb: *//ig; @@ -46,7 +42,6 @@ while (my $l = ) { if ($l =~ /(\d+): (.+)/) { # use date as 01Jan70 my $dnow = strftime('%d%b%y', localtime($1)); - my $cur = strftime('%Y%m%d', localtime($1)); my $txt = $2; # avoid identical multiple commit message @@ -59,12 +54,10 @@ while (my $l = ) { # if we are the same day, just add entry if ($dnow ne $d) { + print "\n$dnow\n"; $d = $dnow; - if (!exists $elt{$cur}) { - push @{$elt{$cur}}, "\n\n$dnow"; - } } - push @{$elt{$cur}}, " - $txt"; + print "- $txt\n"; } else { print STDERR "invalid format: $l\n"; @@ -73,9 +66,5 @@ while (my $l = ) { close(FP); -foreach my $d (sort {$b <=> $a} keys %elt) { - print join("\n", @{$elt{$d}}); -} - -print "\n\nBug fixes\n"; +print "\nBug fixes\n"; print join(" ", sort keys %bugs), "\n"; -- 2.39.5