On 5/26/20 7:31 AM, Alexandre Oliva wrote:
On May 25, 2020, Martin Liška <mli...@suse.cz> wrote:
On 5/21/20 5:14 PM, Rainer Orth wrote:
* In changelog_location, you allow only (among others) "a/b/c/" and
"\ta/b/c/". Please also accept the "a/b/c:" and "\ta/b/c:" forms
here: especially the second seems quite common.
Ok, I believe these formats are supported as well. Feel free to mention
some git revisions that are not recognized.
Hello.
I've long used the following syntax to start ChangeLog entries:
for <some/dir>/ChangeLog
Ah, it's new for me.
It was introduced over 20 years ago, with the (so far never formally
released) GNU CVS-Utilities. Among other goodies, there were scripts to
turn diffs for ChangeLog files into the above format, and vice-versa,
that I've used to this day. It went through cvs, svn and git. It would
be quite nice if I could keep on using it with GCC.
Sure. Starting from now, you don't need to put ChangeLog entries to their
corresponding files, it will be done automatically.
The patch below seems to be enough to pass gcc-verify, and to recognize
and print the expected ChangeLog files. I suppose I'll have to adjust
the formatting to be able to push it, but, aside from that, is it ok to
install?
I'm fine with the patch. Alternative approach is to start using
./contrib/mklog.py (a.k.a. git mklog).
Do any hooks need to be adjusted to match?
Yes, we sync the script from the GCC repository.
I'm also a little concerned about '*/ChangeLog.*' files. Are we no
longer supposed to introduce them, or new ChangeLog entries to them? Or
should the scripts be extended to cover them?
Right now we cover only ChangeLog files, so e.g. ChangeLog.dataflow is not
affected
(and checked). For newly added ChangeLog files, we can add them, but they must
first
appear in the git_commit.py script where we list all allowed locations.
Martin
for contrib/ChangeLog
* gcc-changelog/git_commit.py (changelog_regex): Accept optional
'for' prefix.
diff --git a/contrib/gcc-changelog/git_commit.py
b/contrib/gcc-changelog/git_commit.py
index 2cfdbc8..b8362c1 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -144,7 +144,7 @@ misc_files = [
author_line_regex = \
re.compile(r'^(?P<datetime>\d{4}-\d{2}-\d{2})\ {2}(?P<name>.* <.*>)')
additional_author_regex = re.compile(r'^\t(?P<spaces>\ *)?(?P<name>.* <.*>)')
-changelog_regex = re.compile(r'^([a-z0-9+-/]*)/ChangeLog:?')
+changelog_regex = re.compile(r'^(?:[fF]or +)([a-z0-9+-/]*)/ChangeLog:?')
pr_regex = re.compile(r'\tPR (?P<component>[a-z+-]+\/)?([0-9]+)$')
dr_regex = re.compile(r'\tDR ([0-9]+)$')
star_prefix_regex = re.compile(r'\t\*(?P<spaces>\ *)(?P<content>.*)')