Hi Martin, hi all, currently, mklog searches for "PR" (and "DR") only in the first line of a new 'testsuite' file.
I think in many cases, the PR is listed a bit later than the first line – although, it is usually in the first few lines; in my example, it is in line 3 and 4. Admittedly, I do have cases where later lines are wrong like "! Not tested due to PR ...' How about testing the first, e.g., ten lines? That's what the attached patch does. Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
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. diff --git a/contrib/mklog.py b/contrib/mklog.py index 243edbb15c5..d334a3875c9 100755 --- a/contrib/mklog.py +++ b/contrib/mklog.py @@ -137,7 +137,10 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False): # Extract PR entries from newly added tests if 'testsuite' in file.path and file.is_added_file: - for line in list(file)[0]: + # Only search first ten lines as later lines may + # contains commented code which a note that it + # has not been tested due to a certain PR or DR. + for line in list(file)[0][0:10]: m = pr_regex.search(line.value) if m: pr = m.group('pr') @@ -149,8 +152,6 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False): dr = m.group('dr') if dr not in prs: prs.append(dr) - else: - break if fill_pr_titles: out += get_pr_titles(prs)