]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
Possibility to have fixed changelog
authorKacper Kornet <draenog@pld-linux.org>
Sun, 30 Oct 2011 06:48:14 +0000 (06:48 +0000)
committerKacper Kornet <draenog@pld-linux.org>
Mon, 28 Nov 2011 15:47:08 +0000 (15:47 +0000)
If a note in default name space exists it is used instead for commit log
to generate %changelog in spec file. It offers a possibility to fix
mistakes in commit logs.

builder.sh

index 5dc7b53ef9432e15b859cb8659adda891293f175..67f79066331dfecf73e3f9b6675beaee80d188ed 100755 (executable)
@@ -405,7 +405,11 @@ insert_gitlog() {
        # http://rpm.org/gitweb?p=rpm.git;a=blob;f=build/parseChangelog.c#l31
        # NOTE: changelog date is always in UTC for rpmbuild
        # * 1265749244 +0000 Random Hacker <nikt@pld-linux.org> 9370900
-       git log -${log_entries:-20} --format=format:"* %ad %an <%ae> %h%n%s%n" --date=raw > $gitlog
+       git rev-list -${log_entries:-20} HEAD | while read sha1; do
+               local logfmt='%s%n'
+               git notes list $sha1 &> /dev/null && logfmt=%N
+               git log -n 1 $sha1 --format=format:"* %ad %an <%ae> %h%n${logfmt}%n" --date=raw
+       done > $gitlog
        gawk '/^\* /{printf("* %s %s\n", strftime("%a %b %d %Y", $2), substr($0, length($1)+length($2)+length($3)+4)); next}{print}' $gitlog > $speclog
        sed '/^%changelog/,$d' $SPECFILE | sed -e "\${
                        a%changelog
This page took 0.669574 seconds and 4 git commands to generate.