Commit 18f388a6 authored by Tobias Tebbi's avatar Tobias Tebbi Committed by V8 LUCI CQ

[tools] check format of target branch in roll_merge_gerrit.py

This prevents accidental use for release branch merging, which
works but shouldn't.

Change-Id: I4db99bb721c935a8a1c7c44c1b4d909f44a8bf9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3705382
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81157}
parent 194192b5
...@@ -63,6 +63,9 @@ def main(): ...@@ -63,6 +63,9 @@ def main():
# Get the original commit. # Get the original commit.
revision = options.revision[0] revision = options.revision[0]
if not re.match(r"[0-9]+\.[0-9]+\.[0-9]+", options.branch):
print("Branch is not of the form 1.2.3")
exit(1)
print("Cherry-picking %s onto %s" % (revision, options.branch)) print("Cherry-picking %s onto %s" % (revision, options.branch))
# Create a cherry pick commit from the original commit. # Create a cherry pick commit from the original commit.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment