commit b2b14abc072b8b1d172e41a39fddd11f68efbb0f
parent b83ecfdee958507b271bb1164f088231b5788947
Author: Michael Froman <mfroman@mozilla.com>
Date: Mon, 24 Nov 2025 02:43:48 +0000
Bug 2001165 - add better error messaging if the pre-stack base commit summary is not found. r=dbaker DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D273643
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/dom/media/webrtc/third_party_build/save_patch_stack.py b/dom/media/webrtc/third_party_build/save_patch_stack.py
@@ -69,6 +69,14 @@ def write_prestack_and_standard_patches(
stdout_lines = run_shell(cmd)
base_commit_summary = "Bug 1376873 - Rollup of local modifications"
found_lines = [s for s in stdout_lines if base_commit_summary in s]
+ if len(found_lines) == 0:
+ global error_help
+ error_help = (
+ "The base commit for Mozilla's patch-stack was not found in the\n"
+ "git log. The commit summary we're looking for is:\n"
+ f"{base_commit_summary}"
+ )
+ sys.exit(1)
base_commit_sha = found_lines[0].split(" ")[0]
print(f"Found base_commit_sha: {base_commit_sha}")