]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Make empty changelog fatal error
authorMichal Nowak <mnowak@isc.org>
Wed, 18 Jun 2025 07:52:37 +0000 (09:52 +0200)
committerMichal Nowak <mnowak@isc.org>
Wed, 25 Jun 2025 12:08:14 +0000 (12:08 +0000)
The prep_doc_mr.py script of the bind9-qa repo needs a way to know that
gitchangelog.py did not produce entries. In the case of release notes,
it dies with "No commits matching given revlist". For changelog entries
it used to warn about "Empty changelog", but did not return non-zero
exit code.

(cherry picked from commit 4d0ae4068f07a0f1a62b11629d3f26d798bddb45)

contrib/gitchangelog/gitchangelog.py

index 7d22fe483d5ccf4b7ef364d9db18b139035572e9..33583185b9a66814e8f7d8d345f6ae4b40b62e71 100755 (executable)
@@ -1889,8 +1889,7 @@ def changelog(
     try:
         first_version = next(versions)
     except StopIteration:
-        warn("Empty changelog. No commits were elected to be used as entry.")
-        data["versions"] = []
+        die("Empty changelog. No commits were elected to be used as entry.")
     else:
         data["versions"] = itertools.chain([first_version], versions)