[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: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#81157}
This commit is contained in:
parent
194192b539
commit
18f388a6e9
@ -63,6 +63,9 @@ def main():
|
||||
|
||||
# Get the original commit.
|
||||
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))
|
||||
|
||||
# Create a cherry pick commit from the original commit.
|
||||
|
Loading…
Reference in New Issue
Block a user