aboutsummaryrefslogtreecommitdiff
path: root/contrib/mklog.py
AgeCommit message (Collapse)AuthorFilesLines
2023-01-16Update copyright years.Jakub Jelinek1-1/+1
2022-12-14mklog: do not depend on recent unidiff versionMartin Liska1-2/+3
contrib/ChangeLog: * mklog.py: Check for number of hunks and not if a modified file is binary.
2022-12-12mklog: do not parse binary file for PR entryMartin Liska1-16/+18
contrib/ChangeLog: * mklog.py: Do not search PR entry in a file that is binary.
2022-12-11unidiff: use newline='\n' argumentMartin Liska1-1/+1
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.
2022-07-22Allow space in git commit-mklog argsMartin Liska1-0/+5
contrib/ChangeLog: * git-commit-mklog.py: Do not parse -b argument. Pass mklog_args as json environment variable. * mklog.py: Parse GCC_MKLOG_ARGS and append it to sys.argv. * prepare-commit-msg: Do not append GCC_MKLOG_ARGS to args.
2022-07-22mklog: fill-up subject prefix only for a single PRMartin Liska1-12/+9
contrib/ChangeLog: * mklog.py: Use component: [PR xyz] only when one PR is used.
2021-08-26mklog: fix renaming with version 0.7.0.Martin Liska1-6/+17
contrib/ChangeLog: * mklog.py: Use file.{source,target}_file for proper rename handling.
2021-08-18commit-mklog: Add --co argument.Martin Liska1-1/+8
The argument can be used for addition of Co-Authored-By lines with --trailer='Co-Authored-By=Mona Lisa Octocat <mona@github.com>'. contrib/ChangeLog: * gcc-git-customization.sh: Wrap $@ in quotes. * git-commit-mklog.py: Add new argument --co. * mklog.py: Skip the Co-Authored-By lines.
2021-08-10mklog: support '-b c/101343' format.Martin Liska1-1/+5
contrib/ChangeLog: * mklog.py: Support additional PRs without PR prefix.
2021-06-28mklog: Handle correctly long lines.Martin Liska1-4/+18
contrib/ChangeLog: * mklog.py: Handle correctly long lines. * test_mklog.py: Test it.
2021-06-22contrib: fix a flake8 issueMartin Liska1-1/+1
contrib/ChangeLog: * mklog.py: Fix flake8 issue.
2021-06-21contrib/mklog.py: Improve PR handlingTobias Burnus1-9/+29
Co-authored-by: Martin Sebor <msebor@redhat.com> contrib/ChangeLog: * mklog.py (bugzilla_url): Fetch also component. (pr_filename_regex): New. (get_pr_titles): Update PR string with correct format and component. (generate_changelog): Take additional PRs; extract PR from the filename. (__main__): Add -b/--pr-numbers argument. * test_mklog.py (EXPECTED4): Update to expect a PR for the new file.
2021-06-17mklog: add subject line skeletonJason Merrill1-1/+14
In the recent gcc-commit-mklog thread on gcc@ it occurred to me that the command could also fill in part of the subject line. If the first PR is foo/1234, and the commit does not yet have a subject line, this will add foo: [PR1234] contrib/ChangeLog: * mklog.py: Add an initial component: [PRnnnnn] line when we have a PR.
2021-05-13mklog: Put detected PR entries before ChangeLogsMartin Liska1-2/+8
contrib/ChangeLog: * mklog.py: Put PR entries before all ChangeLog entries (will be added to all ChangeLog locations by Daily bump script). * test_mklog.py: Test the new behavior.
2021-03-23mklog: fix test_mklog.py tests.Martin Liska1-3/+5
contrib/ChangeLog: * mklog.py: Fix broken tests.
2021-03-22mklog: add new argument --directory.Martin Liska1-1/+4
The argument is handy when one needs to generate ChangeLog entries for a different project (e.g. binutils). contrib/ChangeLog: * mklog.py: Add --directory argument.
2021-02-08mklog: automatically fill in generated entriesMike Frysinger1-0/+5
contrib/ChangeLog: * mklog.py (generated_files): New set. (generate_changelog): Add entries based on generated_files.
2021-01-14mklog: skip unsupported filesMartin Liska1-0/+3
This fixes an infinite loop one could see for: git show b87ec922c40 | ./contrib/mklog.py contrib/ChangeLog: * mklog.py: Fix infinite loop for unsupported files.
2021-01-13mklog: support define_insn_and_split formatMartin Liska1-1/+11
contrib/ChangeLog: * mklog.py: Parse also define_insn_and_split and similar directives in .md files. * test_mklog.py: Test.
2021-01-04mklog.py: add --update-copyright optionMartin Liska1-19/+48
contrib/ChangeLog: * mklog.py: Add --update-copyright option which adds: "Update copyright years." to ChangeLog files belonging to a modified file.
2020-11-16mklog: support unidiff 0.5.4Martin Liska1-5/+4
contrib/ChangeLog: * mklog.py: Do not call read on an input stream. Fix some flake8 issues.
2020-09-21mklog.py: Parse first 10 lines for PR/DR numberTobias Burnus1-2/+7
contrib/ChangeLog: * mklog.py: Parse first 10 lines for PR/DR number not only the first line.
2020-05-28mklog: support renaming of filesMartin Liska1-0/+8
contrib/ChangeLog: * mklog.py: Support renaming of files. One needs unidiff 0.6.0+. * test_mklog.py: Test it.
2020-05-26gcc-git: Add prepare-commit-msg hook.Jason Merrill1-1/+22
This patch introduces a prepare-commit-msg hook that appends a ChangeLog skeleton to a commit message when the GCC_FORCE_MKLOG environment variable is set, and a 'git commit-mklog' command set that variable while running 'git commit'. contrib/ChangeLog: * prepare-commit-msg: New file. * gcc-git-customization.sh: Install it. Add commit-mklog alias. * mklog.py: Add new option -c which appends to a ChangeLog file.
2020-05-21mklog: support parsing of DR.Martin Liska1-1/+8
* mklog.py: Support DR parsing. * test_mklog.py: New test for DR parsing.
2020-05-19Use REST API for bug titles in mklog.Martin Liska1-11/+9
* mklog.py: Use REST API for bug title downloading.
2020-05-19mklog.py: improve parsing of struct names (ignore GTY).Martin Liska1-4/+8
* mklog.py: Skip GTY for struct names. Make flake8 happy. * test_mklog.py: Add test for GTY.
2020-05-19New mklog script.Martin Liska1-0/+223
contrib/ChangeLog: 2020-05-15 Martin Liska <mliska@suse.cz> * gcc-git-customization.sh: Add alias.gcc-mklog new hook. * mklog.py: New file. * test_mklog.py: New file.