public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4696] mklog: do not depend on recent unidiff version
@ 2022-12-14 10:35 Martin Liska
0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-12-14 10:35 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e165214777acfe5621ad36e55b16e098d50e1596
commit r13-4696-ge165214777acfe5621ad36e55b16e098d50e1596
Author: Martin Liska <mliska@suse.cz>
Date: Wed Dec 14 11:33:25 2022 +0100
mklog: do not depend on recent unidiff version
contrib/ChangeLog:
* mklog.py: Check for number of hunks and not if a modified
file is binary.
Diff:
---
contrib/mklog.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/contrib/mklog.py b/contrib/mklog.py
index 358b7fc6b8b..5dea8a05c0c 100755
--- a/contrib/mklog.py
+++ b/contrib/mklog.py
@@ -186,8 +186,9 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False,
# contains commented code which a note that it
# has not been tested due to a certain PR or DR.
this_file_prs = []
- if not file.is_binary_file:
- for line in list(file)[0][0:10]:
+ hunks = list(file)
+ if hunks:
+ for line in hunks[0][0:10]:
m = pr_regex.search(line.value)
if m:
pr = m.group('pr')
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-14 10:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14 10:35 [gcc r13-4696] mklog: do not depend on recent unidiff version Martin Liska
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).