public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>, Jakub Jelinek <jakub@redhat.com>
Cc: gcc@gcc.gnu.org
Subject: Re: git gcc-commit-mklog doesn't extract PR number to ChangeLog
Date: Thu, 10 Jun 2021 08:55:59 -0600	[thread overview]
Message-ID: <1230cb99-ed83-3e4e-8362-94f03ee021bc@gmail.com> (raw)
In-Reply-To: <CACb0b4knDt2neUjeM0pjxSVLdJb7rLmObcnzj_TrsjQp+PCZyw@mail.gmail.com>

On 6/10/21 4:40 AM, Jonathan Wakely via Gcc wrote:
> On Thu, 10 Jun 2021 at 11:08, Jakub Jelinek <jakub@redhat.com> wrote:
>>
>> On Thu, Jun 10, 2021 at 11:01:49AM +0100, Jonathan Wakely via Gcc wrote:
>>> On 10/06/21 10:44 +0100, Jonathan Wakely wrote:
>>>>> Quite interesting idea! Are you willing to prepare a patch for it?
>>>>
>>>> This works.
>>>
>>> And this works better, because it checks the PR in the title matches
>>> one in the changelog.
>>>
>>> I'll get something added to the tests and prep this for commit.
>>
>> Note, some commits fix more than one PR.  Sometimes the subject lists
>> just one of them and the ChangeLog several, at other times people mention
>> [PRnnnnnn, PRnnnnnn] etc. in the subject.
>> I think checking that at least one changeLog PR line matches at least one PR
>> in the subject would be good enough.
>>
>> Your regex will not match [PR123456, PR123457] in subject, perhaps ok
> 
> Yeah, that wouldn't get matched, so no checks would be done for the
> changelog body. Not ideal, but better than what we have no where
> nothing is checked at all.
> 
>> initially, and if I read it will will be happy if at least one line matches
>> it.
> 
> Yes, if the summary line has a single PR number, it must be present in
> the changelog body. Other PR numbers can also be in the body, and they
> aren't checked.
> 
> But I've hit an issue trying to test it, because the testcases in
> contrib/gcc-changelog/test_patches.txt are in the form of emails, and
> the Subject: line from the emails is not passed to the GitInfo
> constructor, so isn't part of the message that gets checked.
> 
> Martin, Shouldn't the GitEmail class extract the Subject: from the
> email header and use that as the first line passed to the GitInfo
> object?
> 

I'm a little lost as to what's being changed, and, truth be told,
what exactly the current "right" format is.  Where are the PRnnnnn
strings recognized as special?

The ChangeLog description doesn't seem to cover this and I've been
assuming they're recognized anywhere in the ChangeLog message, but
I think I also noticed they don't always end up updating all
the bugs.

FWIW, in commits for multiple PRs I've been adding a Resolves
line like this:
   https://gcc.gnu.org/pipermail/gcc-cvs/2021-May/347414.html

I usually also add the PR numbers under each ChangeLog but I'm not
sure it's necessary.  It would be good to know and for the ChangeLog
convention to document how exactly this works, and if something
changes, to update the documentation.

Martin

  reply	other threads:[~2021-06-10 14:56 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4c1114a7-2377-99e4-d451-1a086857e991@linux.ibm.com>
2021-06-10  5:22 ` Xionghu Luo
2021-06-10  6:17   ` Martin Liška
2021-06-10  6:25     ` Xionghu Luo
2021-06-10  8:07       ` Martin Liška
2021-06-10  6:35     ` Tobias Burnus
2021-06-10  8:07       ` Martin Liška
2021-06-10  9:44         ` Jonathan Wakely
2021-06-10 10:01           ` Jonathan Wakely
2021-06-10 10:08             ` Jakub Jelinek
2021-06-10 10:40               ` Jonathan Wakely
2021-06-10 14:55                 ` Martin Sebor [this message]
2021-06-10 15:54                   ` Tobias Burnus
2021-06-10 16:05                     ` Jonathan Wakely
2021-06-10 15:56                   ` Jonathan Wakely
2021-06-10 17:06                     ` Martin Sebor
2021-06-10 17:20                       ` Martin Sebor
2021-06-10 17:30                         ` Jakub Jelinek
2021-06-10 18:55                           ` Martin Sebor
2021-06-10 19:09                             ` Jakub Jelinek
2021-06-10 21:16                               ` Martin Sebor
2021-06-10 21:28                                 ` Jakub Jelinek
2021-06-10 21:56                                   ` Martin Sebor
2021-06-11  9:13                                 ` Jonathan Wakely
2021-06-11 17:02                                   ` Martin Sebor
2021-06-11 17:05                                     ` Jakub Jelinek
2021-06-11 17:32                                     ` Jonathan Wakely
2021-06-11 18:01                                       ` Martin Sebor
2021-06-11 18:14                                         ` Jonathan Wakely
2021-06-16  0:56                                         ` Hans-Peter Nilsson
2021-06-16  2:03                                           ` Martin Sebor
2021-06-16  3:42                                             ` Jason Merrill
2021-06-16 14:31                                               ` Martin Sebor
2021-06-16 20:49                                               ` Jason Merrill
2021-06-16 21:45                                                 ` Martin Sebor
2021-06-16 23:45                                                   ` Jason Merrill
2021-06-17  0:17                                                     ` Martin Sebor
2021-06-17  0:40                                                       ` Jason Merrill
2021-06-17  1:01                                                         ` Martin Sebor
2021-06-17  1:46                                                           ` Jason Merrill
2021-06-17 10:18                                                           ` Jonathan Wakely
2021-06-17 14:55                                                             ` Martin Sebor
2021-06-17 15:11                                                               ` Michael Matz
2021-06-17 15:33                                                                 ` Martin Sebor
2021-06-17 16:31                                                                   ` Jakub Jelinek
2021-06-17 16:32                                                                   ` Jonathan Wakely
2021-06-17 18:00                                                                     ` Martin Sebor
2021-06-17 10:08                                                         ` Richard Earnshaw
2021-06-17 17:12                                                           ` Joseph Myers
2021-06-17 17:21                                                             ` Jason Merrill
2021-06-17 17:21                                                             ` Jakub Jelinek
2021-06-18  9:32                                                               ` Richard Earnshaw
2021-06-18 11:05                                                                 ` [Patch] contrib/mklog.py: Improve PR handling (was: git gcc-commit-mklog doesn't extract PR number to ChangeLog) Tobias Burnus
2021-06-18 11:10                                                                   ` Jonathan Wakely
2021-06-18 11:24                                                                     ` Jakub Jelinek
2021-06-18 11:25                                                                     ` Tobias Burnus
2021-06-18 11:40                                                                       ` Jonathan Wakely
2021-06-21  7:28                                                                         ` Martin Liška
2021-06-18 16:40                                                                       ` [Patch] contrib/mklog.py: Improve PR handling Martin Sebor
2021-06-18 14:41                                                                   ` [Patch] contrib/mklog.py: Improve PR handling (was: git gcc-commit-mklog doesn't extract PR number to ChangeLog) Jason Merrill
2021-06-18 16:47                                                                     ` [Patch] contrib/mklog.py: Improve PR handling Martin Sebor
2021-06-18 16:59                                                                       ` Iain Sandoe
2021-06-21  6:42                                                                     ` [Patch] contrib/mklog.py: Improve PR handling (was: git gcc-commit-mklog doesn't extract PR number to ChangeLog) Tobias Burnus
2021-06-21  7:26                                                                       ` Martin Liška
2021-06-21  8:02                                                                         ` Iain Sandoe
2021-06-21  7:54                                                       ` [Patch, v2] contrib/mklog.py: Improve PR handling (was: " Tobias Burnus
2021-06-21  8:09                                                         ` Martin Liška
2021-06-21  8:37                                                           ` Tobias Burnus
2021-06-21 12:53                                                             ` Martin Liška
2021-06-21 13:26                                                               ` Tobias Burnus
2021-06-22  7:30                                                                 ` [RFC][PATCH] contrib: add git-commit-mklog wrapper Martin Liška
2021-06-22  8:23                                                                   ` Tobias Burnus
2021-06-22  8:31                                                                     ` Martin Liška
2021-06-22 18:40                                                                   ` Jason Merrill
2021-06-23  7:40                                                                     ` Martin Liška
2021-06-16 13:46                                             ` git gcc-commit-mklog doesn't extract PR number to ChangeLog Jonathan Wakely
2021-06-16 17:44                                             ` Hans-Peter Nilsson
2021-06-11  9:08                       ` Jonathan Wakely
2021-06-11  9:35                         ` Jonathan Wakely
2021-06-11 15:43                           ` Joseph Myers
2021-06-11 17:02                             ` Jonathan Wakely
2021-06-10 11:51         ` [Patch] contrig/gcc-changelog: Check that PR in subject in in changelog (was:: git gcc-commit-mklog doesn't extract PR number to ChangeLog) Tobias Burnus
2021-06-10 11:54           ` [Patch] contrig/gcc-changelog: Check that PR in subject in in changelog Florian Weimer
2021-06-10 12:45           ` Jonathan Wakely
2021-06-10  9:41   ` git gcc-commit-mklog doesn't extract PR number to ChangeLog Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1230cb99-ed83-3e4e-8362-94f03ee021bc@gmail.com \
    --to=msebor@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jwakely@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).