Skip to content
Snippets Groups Projects
  1. Jan 05, 2024
    • Jonathan Wakely's avatar
      contrib: Remove C-style comments from Python files · 29abd09a
      Jonathan Wakely authored
      These Python scripts have "*/" at the end of the license header comment
      blocks, presumably copy&pasted from C files.
      
      contrib/ChangeLog:
      
      	* analyze_brprob.py: Remove stray text at end of comment.
      	* analyze_brprob_spec.py: Likewise.
      	* check-params-in-docs.py: Likewise.
      	* check_GNU_style.py: Likewise.
      	* check_GNU_style_lib.py: Likewise.
      	* filter-clang-warnings.py: Likewise.
      	* gcc-changelog/git_check_commit.py: Likewise.
      	* gcc-changelog/git_commit.py: Likewise.
      	* gcc-changelog/git_email.py: Likewise.
      	* gcc-changelog/git_repository.py: Likewise.
      	* gcc-changelog/git_update_version.py: Likewise.
      	* gcc-changelog/test_email.py: Likewise.
      	* gen_autofdo_event.py: Likewise.
      	* mark_spam.py: Likewise.
      	* unicode/gen-box-drawing-chars.py: Likewise.
      	* unicode/gen-combining-chars.py: Likewise.
      	* unicode/gen-printable-chars.py: Likewise.
      	* unicode/gen_wcwidth.py: Likewise.
      29abd09a
  2. Jan 03, 2024
  3. Jan 16, 2023
  4. Dec 19, 2022
    • Martin Liska's avatar
      gcc-changelog: allow digit in component name · 7e9ec734
      Martin Liska authored
      contrib/ChangeLog:
      
      	* gcc-changelog/git_commit.py: Allow digit in component name.
      
      contrib/ChangeLog:
      
      	* gcc-changelog/test_email.py: Add new test.
      	* gcc-changelog/test_patches.txt: Add new patch.
      7e9ec734
    • Tobias Burnus's avatar
      gcc-changelog: Add warning for auto-added files · 2b2cec58
      Tobias Burnus authored
      git_email.py prints now a warning for files added automatically.
      git_check_commit.py does likewise but only with --verbose.
      It prints one line per ChangeLog file, either stating the file
      or if more than one the number of files.
      
      contrib/ChangeLog:
      
      	* gcc-changelog/git_check_commit.py (__main__): With -v print a
      	warning for the auto-added files.
      	* gcc-changelog/git_commit.py (GitCommit.__init__): Add self.warnings.
      	(GitCommit.check_mentioned_files): Add warning for auto-added files.
      	(GitCommit.print_warnings): New function.
      	* gcc-changelog/git_email.py (__main__): Remove bogus argument to
      	GitEmail constructor; print auto-added-files warning.
      	* gcc-changelog/test_email.py (test_auto_add_file_1,
      	test_auto_add_file_2): New tests.
      	* gcc-changelog/test_patches.txt: Add two test cases.
      2b2cec58
  5. Dec 14, 2022
    • Martin Liska's avatar
      contrib: add copyright for my scripts · 81f86cb9
      Martin Liska authored
      contrib/ChangeLog:
      
      	* analyze_brprob.py: Add copyright header.
      	* analyze_brprob_spec.py: Likewise.
      	* check-params-in-docs.py: Likewise.
      	* check_GNU_style.py: Likewise.
      	* check_GNU_style_lib.py: Likewise.
      	* filter-clang-warnings.py: Likewise.
      	* gcc-changelog/git_check_commit.py: Likewise.
      	* gcc-changelog/git_commit.py: Likewise.
      	* gcc-changelog/git_email.py: Likewise.
      	* gcc-changelog/git_repository.py: Likewise.
      	* gcc-changelog/git_update_version.py: Likewise.
      	* gcc-changelog/test_email.py: Likewise.
      	* mark_spam.py: Likewise.
      81f86cb9
  6. Dec 11, 2022
    • Martin Liska's avatar
      unidiff: use newline='\n' argument · b0451799
      Martin Liska authored
      In order to support CR on a line, we need to open files
      with newline='\n' as our line endings supposed to be of UNIX style.
      
      contrib/ChangeLog:
      
      	* check_GNU_style.py: Use newline=\n.
      	* check_GNU_style_lib.py: Simplify.
      	* gcc-changelog/git_commit.py: Fix issues seen
      	Rust patchset.
      	* gcc-changelog/git_email.py: Use newline argument.
      	* gcc-changelog/test_email.py: New test.
      	* gcc-changelog/test_patches.txt: New test.
      	* mklog.py: Use newline argument.
      b0451799
  7. Nov 11, 2022
    • Martin Liska's avatar
      changelog: check for space after tab · 999c14cf
      Martin Liska authored
      contrib/ChangeLog:
      
      	* gcc-changelog/git_commit.py: Check for a space after leading
      	tab.
      	* gcc-changelog/test_email.py: Likewise.
      	* gcc-changelog/test_patches.txt: Likewise.
      999c14cf
  8. Jan 24, 2022
    • Martin Liska's avatar
      gcc-changelog: Be stricter for top-level dir. · 978abe91
      Martin Liska authored
      contrib/ChangeLog:
      
      	* gcc-changelog/git_commit.py: New files in toplev must
      	be explicitly marked as "New file".
      	* gcc-changelog/test_email.py: Test.
      	* gcc-changelog/test_patches.txt: Add test.
      978abe91
  9. Oct 18, 2021
  10. Sep 15, 2021
  11. Jun 13, 2021
    • Tobias Burnus's avatar
      contrib/gcc-changelog: Check that PR in subject is in changelog · d554f43c
      Tobias Burnus authored
      This patch checks that a '[PRnnnn]' and '(PRnnnn)' also appears as PR in the
      changelog part of the commit message.  And it does likewise for 'PR comp/nnnn'
      except that then also the component name is checked.  (Note that the reverse
      is permitted, i.e. PR(s) only appearing in the changelog.)
      To avoid false positives, PR numbers in the subject line are ignored,
      if 'revert' appears.
      Additionally, reject commits with a nonempty second line.
      
      contrib/ChangeLog:
      
      	* gcc-changelog/git_commit.py (pr_regex): Add ?P<pr> for group('pr').
      	(subject_pr_regex, subject_pr2_regex): New.
      	(GitInfo.__init__, GitCommit.parse_changelog): Check subject PRs.
      	* gcc-changelog/git_email.py (SUBJECT_PREFIX, subject_patch_regex): New.
      	(GitEmail.__init__): Parse 'Subject:' and pass it to GitInfo.
      	* gcc-changelog/test_email.py (test_pr_only_in_subject,
      	test_wrong_pr_comp_in_subject, test_copyright_years): New.
      	* gcc-changelog/test_patches.txt (0030-PR-c-92746, pr-check1.patch):
      	Update to avoid triggering the new check.
      	(0001-rs6000-Support-doubleword, pr-wrong-comp.patch,
      	copyright-years.patch): New.
      d554f43c
  12. May 24, 2021
  13. May 11, 2021
    • Martin Liska's avatar
      gcc-changelog: Remove non-strict mode. · 8f67bf25
      Martin Liska authored
      contrib/ChangeLog:
      
      	* gcc-changelog/git_check_commit.py: Remove --non-strict-mode.
      	* gcc-changelog/git_commit.py: Remove strict mode.
      	* gcc-changelog/git_email.py: Likewise.
      	* gcc-changelog/git_repository.py: Likewise.
      	* gcc-changelog/test_email.py: Likewise.
      	* gcc-changelog/test_patches.txt: Update patches so that they
      	don't contain a ChangeLog file changes.
      8f67bf25
  14. May 10, 2021
    • Tobias Burnus's avatar
      contrib/gcc-changelog: Detect if same file appears twice · c1d381f0
      Tobias Burnus authored
      contrib/ChangeLog:
      
      	* gcc-changelog/git_commit.py (Error.__repr__): Add space after the colon.
      	(GitCommit.check_mentioned_files): Check whether the same file has been
      	specified multiple times.
      	* gcc-changelog/test_email.py (TestGccChangelog.test_multi_same_file): New.
      	* gcc-changelog/test_patches.txt (0001-OpenMP-Fix-SIMT): New test.
      c1d381f0
  15. Apr 12, 2021
    • Martin Liska's avatar
      mklog: support long filenames · a694a021
      Martin Liska authored
      contrib/ChangeLog:
      
      	* gcc-changelog/git_commit.py: Support long filenames
      	in entries.
      	* gcc-changelog/test_email.py: Test it.
      	* gcc-changelog/test_patches.txt: Likewise.
      a694a021
  16. Mar 12, 2021
    • Martin Liska's avatar
      gcc-changelog: allow ChangeLog deletion in a commit · a7ac3e92
      Martin Liska authored
      contrib/ChangeLog:
      
      	* gcc-changelog/git_commit.py: Allow deletion of ChangeLog
      	files.
      	* gcc-changelog/setup.cfg: Set line limit to 120 characters.
      	* gcc-changelog/test_email.py: Add test.
      	* gcc-changelog/test_patches.txt: Likewise.
      	* gcc-changelog/git_email.py: Fix parsing of deleted files.
      a7ac3e92
  17. Jan 13, 2021
  18. Jan 06, 2021
    • Martin Liska's avatar
      gcc-changelog: workaround for utf8 filenames · 57706dd7
      Martin Liska authored
      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.
      57706dd7
  19. Dec 21, 2020
  20. Nov 30, 2020
    • Martin Liska's avatar
      changelog: add hint for a file mismatch · 57cbb7ac
      Martin Liska authored
      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.
      57cbb7ac
    • Martin Liska's avatar
      changelog: allow subdir wildcard entry · 1e5c644f
      Martin Liska authored
      contrib/ChangeLog:
      
      	* gcc-changelog/git_commit.py: Allow sub-directory wildcard
      	changelog entry. Fix a typo caused by apostrophe escaping.
      	* gcc-changelog/test_email.py: Test it.
      	* gcc-changelog/test_patches.txt: Likewise.
      1e5c644f
  21. Nov 27, 2020
    • Martin Liska's avatar
      changelog: allow flexible "cherry picked" format. · b8ae0812
      Martin Liska authored
      It handles the following:
      (cherry picked from commit c0c7270c (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.
      b8ae0812
  22. Nov 06, 2020
  23. Nov 04, 2020
    • Tobias Burnus's avatar
      gcc-changelog/git_commit.py: Check for missing description · 619039de
      Tobias Burnus authored
      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.
      619039de
  24. Oct 30, 2020
  25. Jul 07, 2020
    • Alexandre Oliva's avatar
      accept <case> and [cond] in ChangeLog · a759bfc7
      Alexandre Oliva authored
      
      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: default avatarMartin Liska <mliska@suse.cz>
      a759bfc7
  26. Jun 17, 2020
    • Martin Liska's avatar
      gcc-changelog: Support 'Backported from master'. · 2021af0c
      Martin Liska authored
      contrib/ChangeLog:
      
      	* gcc-changelog/git_commit.py: Print 'Backported from master'
      	heading to backported commits.
      	* gcc-changelog/test_email.py: Test it.
      	* gcc-changelog/test_patches.txt: Add new patch.
      	* gcc-changelog/git_repository.py: Add commit_to_date hook.
      	* gcc-changelog/git_email.py: Add fuzzy implementation
      	of commit_to_date_hook.
      2021af0c
  27. Jun 10, 2020
    • Martin Liska's avatar
      gcc-changelog: fix parse_git_name_status for renames. · 50ff02b5
      Martin Liska authored
      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.
      50ff02b5
    • Martin Liska's avatar
      gcc-changelog: add more Review by prefixes. · 771e60dd
      Martin Liska authored
      contrib/ChangeLog:
      
      	* gcc-changelog/git_commit.py: Add more supported prefixes.
      	* gcc-changelog/test_email.py: Fix one flake8 error.
      	* gcc-changelog/test_patches.txt: Add tested for newly
      	supported prefixes.
      771e60dd
    • Jonathan Wakely's avatar
      gcc-changelog: Improve git_commit.py diagnostics · 1ea9a0b7
      Jonathan Wakely authored
      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.
      1ea9a0b7
  28. Jun 09, 2020
    • Martin Liska's avatar
      gcc-changelog: fix deduction for root ChangeLog · 4373fd2c
      Martin Liska authored
      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.
      4373fd2c
  29. Jun 02, 2020
  30. May 29, 2020
  31. May 28, 2020
    • Pierre-Marie de Rodat's avatar
      gcc-changelog: enhance handling of renamings · a634157d
      Pierre-Marie de Rodat authored
      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.
      a634157d
  32. May 26, 2020
    • Pierre-Marie de Rodat's avatar
      gcc-changelog: handle entries with multi-line file lists · 519f2506
      Pierre-Marie de Rodat authored
      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.
      519f2506
Loading