This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Teach mklog to reference PRs.


On 8/1/19 3:26 PM, Jakub Jelinek wrote:
> On Thu, Aug 01, 2019 at 03:09:22PM +0200, Martin Liška wrote:
>> Hi.
>>
>> I use quite often mklog and then I manually write references
>> to PRs. I would like to teach the script to do it for me.
>> Example:
>>
>> $ ./contrib/mklog /tmp/patch -b lto/91307,c/12345 > /tmp/changelog
>> $ cat /tmp/changelog
>> (PR lto/91307,c/12345)
> 
> Why this?  The whole ChangeLog entry should be the commit message,
> so repeating it looks useless.

The PR will then appear in a commit message and so that one can see
it in a email subject.

If you don't like it, then I'll stop doing that :)

> 
> OT I'm actually quite annoyed by mklog repeating the date/name/email
> for each changelog, I'd find it much more natural to print that and the
> list of PRs once and then just those contrib/, gcc/testsuite/ etc.
> snippets with prefixes (ideally without the ChangeLog: part that I also
> routinely remove).  Or have mklog option to switch between those two
> variants.

Well, I see it better to write it for each ChangeLog file. And I have a script
that takes all ChangeLog entries and appends them to corresponding files.
Would you be interested in upstreaming of the script?

> 
>> contrib/ChangeLog:
>>
>> 2019-08-01  Martin Liska  <mliska@suse.cz>
>>
>>         PR lto/91307
>>         PR c/12345
> 
> This looks wrong, even the PR lines should be prefixed by a tab, not 8
> spaces.

Sure.

> 
> And IMHO it would be useful if mklog could grab the list of PRs
> automatically from the patch if there are any (as in, for any new tests
> (added new */testsuite/* files) look for comments early in the file and
> extract PR whatever/NNNNN references from there).

That sounds good! People should write tests and as a bonus, they will
have PRs filled in mklog ChangeLog. I'll work on that.

Martin

> 
> 	Jakub
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]