contrib/ChangeLog:
* gcc-changelog/git_commit.py: Support wrapping of functions
in parentheses that can take multiple lines.
* gcc-changelog/test_email.py: Add tests for it.
* gcc-changelog/test_patches.txt: Add 2 patches.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Allow modifications of older
ChangeLog (or specific) files without need to make a ChangeLog
entry.
* gcc-changelog/test_email.py: Test it.
* gcc-changelog/test_patches.txt: Add new patch.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Add decode_path function.
* gcc-changelog/git_email.py: Use it in order to solve
utf8 encoding filename issues.
* gcc-changelog/git_repository.py: Likewise.
* gcc-changelog/test_email.py: Test it.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Add new error for quoted
filenames.
* gcc-changelog/test_email.py: Test it.
* gcc-changelog/test_patches.txt: Test it.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Suggest close file for
'unchanged file mentioned in a ChangeLog' error.
* gcc-changelog/test_email.py: Test it.
This allows using "testsuite/*" in libstdc++-v3/ChangeLog entries, which
was one of the original motivations for adding wildcard support in the
first place:
https://gcc.gnu.org/pipermail/gcc/2020-June/232719.html
contrib/ChangeLog:
* gcc-changelog/git_commit.py (wildcard_prefixes): Add libstdc++
testsuite directory.
It handles the following:
(cherry picked from commit c0c7270cc4 (testsuite changes only))
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Use regex for cherry pick prefix.
* gcc-changelog/test_email.py: Test it.
* gcc-changelog/test_patches.txt: Likewise.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Add new check.
* gcc-changelog/test_email.py: Test it.
* gcc-changelog/test_patches.txt: Add new patch.
Change the default that is used by GIT server hook and also
by git_update_version.py. Both should use True now.
contrib/ChangeLog:
* gcc-changelog/git_repository.py: Set strict=True
for parse_git_revisions as a default.
Especially when using mklog.py, it is simply to forget to fill in
the entries after the '\t* file.c (section):' or '\t(section):'.
contrib/ChangeLog:
* gcc-changelog/git_commit.py (item_parenthesis_empty_regex,
item_parenthesis_regex): Add.
(check_for_empty_description): Use them.
* gcc-changelog/test_email.py (test_emptry_entry_desc,
test_emptry_entry_desc_2): Add.
* gcc-changelog/test_patches.txt: Add two testcases for it.
Only '(' and ':' currently terminate file lists in ChangeLog entries
in the ChangeLog parser. This rules out such legitimate entries as:
* filename <CASE>:
* filename [COND]:
This patch extends the ChangeLog parser to recognize these forms.
for contrib/ChangeLog
* gcc-changelog/git_commit.py: Support CASE and COND.
* gcc-changelog/test_patches.txt: Add test.
* gcc-changelog/test_email.py: Add test.
Co-Authored-By: Martin Liska <mliska@suse.cz>
contrib/ChangeLog:
* gcc-changelog/git_update_version.py: Support merge commits
and walk only on the branch that is being merged and generate
missing ChangeLog entries.
The argument can be useful to update arbitrary branch, the changes
are added to git index and user is supposed to make a commit.
contrib/ChangeLog:
* gcc-changelog/git_update_version.py: Add --curent argument.
Renamed files are listed in the following format:
M gcc/ada/Makefile.rtl
M gcc/ada/impunit.adb
R097 gcc/ada/libgnat/s-atopar.adb gcc/ada/libgnat/s-aoinar.adb
R095 gcc/ada/libgnat/s-atopar.ads gcc/ada/libgnat/s-aoinar.ads
A gcc/ada/libgnat/s-aomoar.adb
A gcc/ada/libgnat/s-aomoar.ads
So 'R' is followed by a percentage number.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Fix renamed files in
parse_git_name_status.
* gcc-changelog/test_email.py: Add test for it.
This changes some error messages to be more self-consistent and to fix
some grammar.
contrib/ChangeLog:
* gcc-changelog/git_commit.py (GitCommit.parse_changelog):
Improve error strings.
* gcc-changelog/test_email.py: Update expected errors.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Fix ChangeLog regex in order to
match the top-level ChangeLog.
* gcc-changelog/test_email.py: Add test.
* gcc-changelog/test_patches.txt: Likewise.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Support foo/bar/*: patterns in
wildcard_prefixes locations.
* gcc-changelog/test_email.py: Test it.
* gcc-changelog/test_patches.txt: Add 3 new patches.
The files in this subdirectory are part of the D2 test suite maintained
in the upstream DMD code repository.
contrib/ChangeLog:
* gcc-changelog/git_commit.py (ignored_prefixes): Add
gcc/testsuite/gdc.test/.
This error is wrong, the line is what exceeds LINE_LIMIT characters, the
limit doesn't exceed itself.
contrib/ChangeLog:
* gcc-changelog/git_commit.py (GitCommit.parse_changelog): Fix
grammar.
The patch is about to handle situations like seen
in 3ea6977d0f.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Properly
handle duplicite authors.
* gcc-changelog/test_email.py: New test.
* gcc-changelog/test_patches.txt: New patch.
So far, we expect from a commit that renames a file to contain a
changelog entry only for the new name. For example, after the following
commit:
$ git move foo bar
$ git commit
We expect the following changelog:
* bar: Renamed from foo.
Git does not keep track of renamings, only file deletions and additions.
The display of patches then uses heuristics (with config-dependent
parameters) to try to match deleted and added files in the same commit.
It is thus brittle to rely on this information.
This commit modifies changelog processing so that renames are considered
as a deletion of a file plus an addition of another file. The following
changelog is now expected for the above example:
* foo: Move...
* bar: Here.
contrib/
* gcc-changelog/git_email.py (GitEmail.__init__): Interpret file
renamings as a file deletion plus a file addition.
* gcc-changelog/git_repository.py (parse_git_revisions):
Likewise.
* gcc-changelog/test_email.py: New testcase.
* gcc-changelog/test_patches.txt: New testcase.
This extends the ChangeLog entries parsing machinery to handle entries
that cover multiple files spanning over multiple lines. For instance:
* first_file_patched.c, second_file_patched.c, third_file_patched.c,
fourth_file_patched.c: Do things.
contrib/
* gcc-changelog/git_commit.py (ChangeLogEntry): Handle entries
with multi-line file lists.
* gcc-changelog/test_email.py: New testcase.
* gcc-changelog/test_patches.txt: Likewise.
Currently, running gcc-changelog's unit tests may clutter the output
with tons of warnings such as:
.../contrib/gcc-changelog/git_email.py:40: ResourceWarning: unclosed
file <_io.TextIOWrapper name='/tmp/tmpt5okd4qp.patch' mode='r'
encoding='UTF-8'>
lines = open(self.filename).read().splitlines()
ResourceWarning: Enable tracemalloc to get the object allocation
traceback
This commit fixes these leaks, which restores a clean testsuite output.
contrib/
* gcc-changelog/git_update_version.py: Close file objects after
use.
* gcc-changelog/git_email.py: Likewise.
* gcc-changelog/test_email.py: Likewise.
The patch improves the script based on Jakub's needs,
I'm going to install the patch.
contrib/ChangeLog:
* gcc-changelog/git_update_version.py: Add 2 new options.
I've long introduced ChangeLog entries as "for dir/ChangeLog", a
format adopted by GNU CVS-Utilities some 20 years ago. My commits
have been formatted like this forever.
This patch makes it acceptable for git gcc-verify.
contrib/ChangeLog:
* gcc-changelog/git_commit.py (changelog_regex): Accept optional
'for' prefix.
We should be able to generate ChangeLog entries for
commits like b3d566f570.
I'm going to install the patch.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Parse changelog entries for
ignored locations.
* gcc-changelog/test_email.py: Add new test for it.
* gcc-changelog/test_patches.txt: Likewise.
* gcc-changelog/git_commit.py: Add trailing '/'
for libdruntime. Allow empty changelog for
only ignored files.
* gcc-changelog/test_email.py: New test for go
patch in ignored location.
* gcc-changelog/test_patches.txt: Add test.
2020-05-22 Jakub Jelinek <jakub@redhat.com>
* gcc-changelog/git_commit.py: Add trailing / to
gcc/testsuite/go.test/test and replace gcc/go/frontend/
with gcc/go/gofrontend/ in ignored locations.