Commit Graph

22 Commits

Author SHA1 Message Date
Martin Liska
e370a2482d mklog: fix renaming with version 0.7.0.
contrib/ChangeLog:

	* mklog.py: Use file.{source,target}_file for proper rename
	handling.
2021-08-26 10:20:20 +02:00
Martin Liska
0684c8d3ef commit-mklog: Add --co argument.
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-18 10:36:35 +02:00
Martin Liska
84f906df4f mklog: support '-b c/101343' format.
contrib/ChangeLog:

	* mklog.py: Support additional PRs without PR prefix.
2021-08-10 17:53:48 +02:00
Martin Liska
b838641bb0 mklog: Handle correctly long lines.
contrib/ChangeLog:

	* mklog.py: Handle correctly long lines.
	* test_mklog.py: Test it.
2021-06-28 13:43:41 +02:00
Martin Liska
48b312b4ba contrib: fix a flake8 issue
contrib/ChangeLog:

	* mklog.py: Fix flake8 issue.
2021-06-22 09:50:38 +02:00
Tobias Burnus
edf0c3ffb5 contrib/mklog.py: Improve PR handling
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-21 15:17:45 +02:00
Jason Merrill
58e3b17f4c mklog: add subject line skeleton
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-06-17 13:15:57 -04:00
Martin Liska
fef084dc83 mklog: Put detected PR entries before ChangeLogs
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-05-13 15:13:31 +02:00
Martin Liska
e54da1b6b3 mklog: fix test_mklog.py tests.
contrib/ChangeLog:

	* mklog.py: Fix broken tests.
2021-03-23 08:49:25 +01:00
Martin Liska
c38f679eeb mklog: add new argument --directory.
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-03-22 10:54:32 +01:00
Mike Frysinger
432b9f610d mklog: automatically fill in generated entries
contrib/ChangeLog:

	* mklog.py (generated_files): New set.
	(generate_changelog): Add entries based on generated_files.
2021-02-08 11:52:30 -05:00
Martin Liska
236d6a33ca mklog: skip unsupported files
This fixes an infinite loop one could see for:
git show b87ec922c4 | ./contrib/mklog.py

contrib/ChangeLog:

	* mklog.py: Fix infinite loop for unsupported files.
2021-01-14 17:06:08 +01:00
Martin Liska
a2d04f3d2c mklog: support define_insn_and_split format
contrib/ChangeLog:

	* mklog.py: Parse also define_insn_and_split and similar
	directives in .md files.
	* test_mklog.py: Test.
2021-01-13 14:34:08 +01:00
Martin Liska
cf76bbf8a8 mklog.py: add --update-copyright option
contrib/ChangeLog:

	* mklog.py: Add --update-copyright option which adds:
	"Update copyright years." to ChangeLog files belonging
	to a modified file.
2021-01-04 10:09:07 +01:00
Martin Liska
d6d9561c2e mklog: support unidiff 0.5.4
contrib/ChangeLog:

	* mklog.py: Do not call read on an input stream.
	Fix some flake8 issues.
2020-11-16 20:26:28 +01:00
Tobias Burnus
ed5ae55e93 mklog.py: Parse first 10 lines for PR/DR number
contrib/ChangeLog:

	* mklog.py: Parse first 10 lines for PR/DR number
	not only the first line.
2020-09-21 11:22:49 +02:00
Martin Liska
eb78da45ab
mklog: support renaming of files
contrib/ChangeLog:

	* mklog.py: Support renaming of files.
	One needs unidiff 0.6.0+.
	* test_mklog.py: Test it.
2020-05-28 10:27:09 +02:00
Jason Merrill
757dbb59c1
gcc-git: Add prepare-commit-msg hook.
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-26 08:38:24 +02:00
Martin Liska
e7c7cdc5f4
mklog: support parsing of DR.
* mklog.py: Support DR parsing.
	* test_mklog.py: New test for DR parsing.
2020-05-21 10:14:56 +02:00
Martin Liska
25c284f148
Use REST API for bug titles in mklog.
* mklog.py: Use REST API for bug title downloading.
2020-05-19 21:17:09 +02:00
Martin Liska
4f85a52c94
mklog.py: improve parsing of struct names (ignore GTY).
* mklog.py: Skip GTY for struct names.  Make flake8 happy.
	* test_mklog.py: Add test for GTY.
2020-05-19 12:33:46 +02:00
Martin Liska
00243d9a64
New mklog script.
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.
2020-05-19 11:40:55 +02:00