git-drover: TBR appropriate reviewers
When uploading to either Rietveld or Gerrit, this will
cause git-cl to add the appropriate reviewers to the
cherry-pick review, so they're aware the change is being
copied to the release branch.
When uploading to Gerrit, this will also cause git-cl to
set the Code-Review+1 bit, allowing the CL to be landed
R=tandrii@chromium.org
Bug: 714720
Change-Id: Ie04e2657a91e4345796ac2200c0115fb18e460a1
Reviewed-on: https://chromium-review.googlesource.com/486961
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/git_drover.py b/git_drover.py
index f477566..f5313fc 100755
--- a/git_drover.py
+++ b/git_drover.py
@@ -9,6 +9,7 @@
import functools
import logging
import os
+import re
import shutil
import subprocess
import sys
@@ -274,7 +275,9 @@
return True
self._run_git_command(['reset', '--hard'])
- self._run_git_command(['cl', 'upload'],
+
+ author = self._run_git_command(['log', '-1', '--format=%ae']).strip()
+ self._run_git_command(['cl', 'upload', '--tbrs', author],
error_message='Upload failed',
interactive=True)
@@ -294,6 +297,9 @@
interaction. If false, the command will be provided with no input and
the output is captured.
+ Returns:
+ stdout as a string, or stdout interleaved with stderr if self._verbose
+
Raises:
Error: The command failed to complete successfully.
"""
@@ -321,6 +327,9 @@
args: A list of strings containing the args to pass to git.
stdin: A string to provide on stdin.
+ Returns:
+ stdout as a string, or stdout interleaved with stderr if self._verbose
+
Raises:
Error: The command failed to complete successfully.
"""