[Privoxy-devel] changelog

Lee ler762 at gmail.com
Fri Oct 26 19:16:02 UTC 2018


On 10/26/18, Fabian Keil <fk at fabiankeil.de> wrote:
> Lee <ler762 at gmail.com> wrote:
>
>> On 10/25/18, Fabian Keil <fk at fabiankeil.de> wrote:
>> > Lee <ler762 at gmail.com> wrote:
>> >
>> >> I'm working on updating the documentation & ran into a snag, so
>> >> resurrecting an old thread..
>> >>
>> >> On 8/25/16, Fabian Keil <fk at fabiankeil.de> wrote:
>> >> > Lee <ler762 at gmail.com> wrote:
>> >> >
>> >> >> There's got to be a better way to generate a changelog than
>> >> >>
>> >> >> cvs history -c -a -D '2016-05-29'
>> >> >>
>> >> >> and then using
>> >> >> http://ijbswa.cvs.sourceforge.net/viewvc/ijbswa/current/
>> >> >>
>> >> >> to get all the comments.   How do you do it?
>> >> >
>> >> > I start with "git log $last_tag..".
>> >> >
>> >> > It's probably a lot better than additionally having to
>> >> > rely on cvsweb, but it's still a tedious process.
>> >>
>> >> $ git log v_3_0_26..HEAD >| /tmp/x
>> >> seems to do what I want, but then
>> >>
>> >> $ /source/privoxy/privoxy/utils/changelog2doc.pl /tmp/x
>> >> Modification of non-creatable array value attempted, subscript -1 at
>> >> /source/privoxy/privoxy/utils/changelog2doc.pl line 59, <> line 2241.
>> >>
>> >> line 2241 is the blank line I added at the end of /tmp/x after it died
>> >> the 1st time at line 2240
>> >>
>> >> Help!  I don't understand what's going wrong.  Or what I did wrong
>> >
>> > changelog2doc.pl expects a ChangeLog as input so the output
>> > of "git log" has to be reformatted and can't be used as is.
>>
>> So turning the output of 'git log' into a ChangeLog would be taking this
>> input:
>>
>> commit b374496daac41b610b0c0d4b2367efbf41880554
>> Author: Lee <ler762 at users.sourceforge.net>
>> Date:   Tue Oct 23 12:00:20 2018 -0400
>>
>>     improve handling of @@line continuations
>>
>>       # XXX: someone should figure out what this stuff
>>       # is supposed to do (and if it really does that).
>>     still holds
>>
>> commit 05b37b3095d983ae3695981fa2e761791abb215c
>> Author: Fabian Keil <fk at fabiankeil.de>
>> Date:   Tue Oct 23 16:44:39 2018 +0200
>>
>>     Remove an obsolete comment
>>
>> commit b0dfc691e79ad10ecb87dfac4070a48b010adb6f
>> Author: Fabian Keil <fk at fabiankeil.de>
>> Date:   Tue Oct 23 16:41:27 2018 +0200
>>
>>     Fix compiler warnings
>>
>>     jcc.c:1012:27: warning: implicit conversion changes signedness:
>> 'jb_err' (aka 'enum privoxy_err') to 'int' [-Wsign-conversion]
>>              jb_err_to_string(err));
>>              ~~~~~~~~~~~~~~~~ ^~~
>>     jcc.c:1721:45: warning: implicit conversion changes signedness:
>> 'jb_err' (aka 'enum privoxy_err') to 'int' [-Wsign-conversion]
>>              csp->ip_addr_str, jb_err_to_string(err));
>>                                ~~~~~~~~~~~~~~~~ ^~~
>>
>>
>> and creating this output:
>>
>> - commit b374496daac41b610b0c0d4b2367efbf41880554
>>     improve handling of @@line continuations
>>
>>       # XXX: someone should figure out what this stuff
>>       # is supposed to do (and if it really does that).
>>     still holds
>> - commit 05b37b3095d983ae3695981fa2e761791abb215c
>>     Remove an obsolete comment
>> - commit b0dfc691e79ad10ecb87dfac4070a48b010adb6f
>>     Fix compiler warnings
>>
>>     jcc.c:1012:27: warning: implicit conversion changes signedness:
>> 'jb_err' (aka 'enum privoxy_err') to 'int' [-Wsign-conversion]
>>              jb_err_to_string(err));
>>              ~~~~~~~~~~~~~~~~ ^~~
>>     jcc.c:1721:45: warning: implicit conversion changes signedness:
>> 'jb_err' (aka 'enum privoxy_err') to 'int' [-Wsign-conversion]
>>              csp->ip_addr_str, jb_err_to_string(err));
>>                                ~~~~~~~~~~~~~~~~ ^~~
>>
>> Or do you take only the comments from a commit up to the first blank line?
>> eg
>>
>> - commit b374496daac41b610b0c0d4b2367efbf41880554
>>     improve handling of @@line continuations
>> - commit 05b37b3095d983ae3695981fa2e761791abb215c
>>     Remove an obsolete comment
>> - commit b0dfc691e79ad10ecb87dfac4070a48b010adb6f
>>     Fix compiler warnings
>>
>> Or ???
>
> I usually take the whole content of the commit message but
> in case of trivial commits like the ones above I would probably
> summarise them (as code clean-ups or something like this).
>
> I don't think we need the commit IDs in the ChangeLog as
> it's supposed to be readable by "normal" users. Experts
> can refer to the git log.

How's this?

$ cat makeChangeLog
#!/usr/bin/awk -f
# take output from
#   git log [last release tag]..HEAD
# and reformat as a ChangeLog
/^commit /  { new = 1; next }
/^Merge: /  { next }
/^Author: / { next }
/^Date: /   { next }
/^  *$/     { next } # ignore blank lines
/^ / {
    if ( new ) {
        new = 0
        sub("^   ", "  -", $0); # 1st line of a change
    }
    print $0
}

$ makeChangeLog /tmp/x
  - Merge branch 'master' of ssh://git.privoxy.org:23/git/privoxy
  - improve handling of @@line continuations
      # XXX: someone should figure out what this stuff
      # is supposed to do (and if it really does that).
    still holds
  - Remove an obsolete comment
  - Fix compiler warnings
    jcc.c:1012:27: warning: implicit conversion changes signedness:
'jb_err' (aka 'enum privoxy_err') to 'int' [-Wsign-conversion]
             jb_err_to_string(err));
             ~~~~~~~~~~~~~~~~ ^~~
    jcc.c:1721:45: warning: implicit conversion changes signedness:
'jb_err' (aka 'enum privoxy_err') to 'int' [-Wsign-conversion]
             csp->ip_addr_str, jb_err_to_string(err));
                               ~~~~~~~~~~~~~~~~ ^~~
  - Change include order so errlog.h can use jb_err
     <.. snip ..>

and then it's an entirely manual process to
>> And then make another pass to move the changes under
>> - Bug fixes:
>> - General improvements:
>> - Action file improvements:
>> - Filter file improvements:
>> - Build system improvements:
>> - configure improvements:
>> - Documentation improvements:
>> - Code cleanups:
>> - Log message improvements:
>> - Privoxy-Log-Parser:
>> - Privoxy-Regression-Test:
>> - Website improvements:

lee


More information about the Privoxy-devel mailing list