From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 102EA3850419 for ; Thu, 10 Jun 2021 15:54:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 102EA3850419 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 6M+DrMPorn1tA6ORqsDEWS6yvJeG+JRelhesYd8g2AwM0s6aYIwhd3b3R4Ri5FpJZgB5kJpcHq 0ShpXvPA8yU1anZX1dWtWm2zMYk+cWX4+2InA84VffFJVE5J6tWVAd+Hvz4jRT4rm3I8n2KICo +K8ww3n6mYt10L4/NLN24jBdvQuNaEXkOhs098EJRMeIU+A/g7q0e02z8LtdPv8jV3DJixXItH x7LmhEz4uBwHEWU6RaBpm04YnExRdZxm3qIWMH7F2Hww8IHKYA05ViseqEYdpjl0LGtf2WR8KE Q4o= X-IronPort-AV: E=Sophos;i="5.83,263,1616486400"; d="scan'208";a="64670116" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 10 Jun 2021 07:54:37 -0800 IronPort-SDR: 0TYAE+pZscGk02Ed87jlsHB6a5WN1Gozi0f5B0sLpkScxFd7CJRwxdaRphcnNGzB0congXJCZp UmmmohN7LWu883WR90Q+pQBHsHMwlQqW1W4k6ONSUcbOZu0c9AxNb2SM0QQpIriA5Ylzpq6d8Y WFFH2MNxAGRg5GRpZf9iOz8cnTvys/pTPsjWY6Z0ifpndN6Z43lWYJAouvqwsOVp6Iy0Nre28z szV7Lj14UlvTVusUvPYvxfDUVHRyNETb3Lms5iQmlhH31c6AMPGkz9u5Lo116TuFgUCQG6hq0W TFo= Subject: Re: git gcc-commit-mklog doesn't extract PR number to ChangeLog To: Martin Sebor , Jonathan Wakely , Jakub Jelinek CC: References: <36a4f5c4-357a-ca1c-e7f5-ede6ff3ba445@suse.cz> <20210610100851.GD7746@tucnak> <1230cb99-ed83-3e4e-8362-94f03ee021bc@gmail.com> From: Tobias Burnus Message-ID: <008e703f-074f-d934-313f-d495231e5c18@codesourcery.com> Date: Thu, 10 Jun 2021 17:54:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1230cb99-ed83-3e4e-8362-94f03ee021bc@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 15:54:41 -0000 On 10.06.21 16:55, Martin Sebor via Gcc wrote: > 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? For my version of the patch at least, which is https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572483.html : If the first line (subject line) contains '.... [PR12345]', that commit is now rejected unless 'PR comp/12345' also in in the 'body'/changelog part of the patch. (This does not apply to your commit as you don't have such number.) That avoids issues where one has added it to the subject line (which usually matches also the email subject) but has forgotten to include it also in GCC's patch format. That avoids a common pitfall of not having the PR in the generated changelog files and the commit is not added as Bugzilla comment. That's orthogonal to questions like: how should commits be formatted in general; do we want to extend the requirements, what exactly should be written in the first line of the commit etc. Regarding: > 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 The current pattern matches something like '^\tPR component/12345$'. In your commits, you have the Bugzilla title after the PR number, which is currently not matched. =E2=80=94 Your commit also includes the same numbers without tailing strings, hence, for the linked commit, the script should have extracted the PR number. (One can argue whether the accepted format should/could be extended but in the ChangeLog files, it also was just PR /.= ) > I usually also add the PR numbers under each ChangeLog but I'm not > sure it's necessary. You can also have the PR lines before the first 'directory/' or 'directory/ChangeLog' line, then it applies to all ChangeLog files. =E2=80= =94 Thus, you do not need to repeat it. (With the caveat of above.) > 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. I think the accepted changelog convention has not really changed. And the changelog script mostly diagnosed issues which were also wrong before =E2=80=93 or are obviously wrong. In my experience, it finds a lot o= f valid issues and rejects only very little which should be accepted. There is an unofficial convention to use [PR1234] in the first line of the commit (and the email subject), but that's not enforced by the script. Independent of the PR matching and checking issues, I think Jonathan was thinking about extending the documentation (as I gathered from IRC #gcc); I did not quite follow whether it is about best practice or contained bits which should be enforced. Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 M=C3=BCnchen R= egistergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thomas H= eurung, Frank Th=C3=BCrauf