Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: tools/push-to-trunk/push_to_trunk.py

Issue 158733002: Enable specification of author email in push-to-trunk. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/push-to-trunk/common_includes.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/push-to-trunk/push_to_trunk.py
diff --git a/tools/push-to-trunk/push_to_trunk.py b/tools/push-to-trunk/push_to_trunk.py
index 9c30570f5ebaf690cda4639ac3637fab9bcf6c87..cd7803a95883ce0b76b34c10c896a96274b3f188 100755
--- a/tools/push-to-trunk/push_to_trunk.py
+++ b/tools/push-to-trunk/push_to_trunk.py
@@ -54,7 +54,7 @@ CONFIG = {
class PushToTrunkOptions(CommonOptions):
@staticmethod
- def MakeForcedOptions(reviewer, chrome_path):
+ def MakeForcedOptions(author, reviewer, chrome_path):
"""Convenience wrapper."""
class Options(object):
pass
@@ -65,6 +65,7 @@ class PushToTrunkOptions(CommonOptions):
options.m = False
options.r = reviewer
options.c = chrome_path
+ options.a = author
return PushToTrunkOptions(options)
def __init__(self, options):
@@ -75,6 +76,7 @@ class PushToTrunkOptions(CommonOptions):
self.l = options.l
self.r = options.r
self.c = options.c
+ self.author = getattr(options, 'a', None)
class Preparation(Step):
MESSAGE = "Preparation."
@@ -492,8 +494,11 @@ class UploadCL(Step):
% (ver, self._state["svn_revision"], rev))
if self.Git(args) is None:
self.Die("'git commit' failed.")
+ author_option = self._options.author
+ author = " --email \"%s\"" % author_option if author_option else ""
force_flag = " -f" if self._options.force_upload else ""
- if self.Git("cl upload --send-mail%s" % force_flag, pipe=False) is None:
+ if self.Git("cl upload%s --send-mail%s" % (author, force_flag),
+ pipe=False) is None:
self.Die("'git cl upload' failed, please try again.")
print "CL uploaded."
@@ -568,6 +573,8 @@ def RunPushToTrunk(config,
def BuildOptions():
result = optparse.OptionParser()
+ result.add_option("-a", "--author", dest="a",
+ help=("Specify the author email used for rietveld."))
result.add_option("-c", "--chromium", dest="c",
help=("Specify the path to your Chromium src/ "
"directory to automate the V8 roll."))
@@ -601,6 +608,9 @@ def ProcessOptions(options):
if not options.m and not options.c:
print "A chromium checkout (-c) is required in (semi-)automatic mode."
return False
+ if not options.m and not options.a:
+ print "Specify your chromium.org email with -a in (semi-)automatic mode."
+ return False
return True
« no previous file with comments | « tools/push-to-trunk/common_includes.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698