Reviewers: Jakob,
Message:
PTAL
Description:
Force 'git cl upload' in push-to-trunk forced mode.
Please review this at https://codereview.chromium.org/77853003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+12, -6 lines):
M tools/push-to-trunk/common_includes.py
M tools/push-to-trunk/push_to_trunk.py
M tools/push-to-trunk/test_scripts.py
Index: tools/push-to-trunk/common_includes.py
diff --git a/tools/push-to-trunk/common_includes.py
b/tools/push-to-trunk/common_includes.py
index
9547367225d5ce3b7f7384094069a35e317d8f6c..14f130b3f4b4cd9826c658ade911292a2c318fc8
100644
--- a/tools/push-to-trunk/common_includes.py
+++ b/tools/push-to-trunk/common_includes.py
@@ -370,15 +370,18 @@ class UploadStep(Step):
Step.__init__(self, "Upload for code review.")
def RunStep(self):
- if self._options and self._options.r:
+ if self._options.r:
print "Using account %s for review." % self._options.r
reviewer = self._options.r
else:
print "Please enter the email address of a V8 reviewer for your
patch: ",
self.DieInForcedMode("A reviewer must be specified in forced mode.")
reviewer = self.ReadLine()
- args = "cl upload -r \"%s\" --send-mail" % reviewer
- if self.Git(args,pipe=False) is None:
+ force_flag = " -f" if self._options.f else ""
+ args = "cl upload -r \"%s\" --send-mail%s" % (reviewer, force_flag)
+ # TODO(machenbach): Check output in forced mode. Verify that all
required
+ # base files were uploaded, if not retry.
+ if self.Git(args, pipe=False) is None:
self.Die("'git cl upload' failed, please try again.")
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
c8fdc7e9d3865df3409dca1ccaacc02b854ea12d..8b763f54ec22ec1c062af4b32af1a8d584afb7a3
100755
--- a/tools/push-to-trunk/push_to_trunk.py
+++ b/tools/push-to-trunk/push_to_trunk.py
@@ -457,7 +457,8 @@ class UploadCL(Step):
args = "commit -am \"Update V8 to version %s.\n\nTBR=%s\"" % (ver, rev)
if self.Git(args) is None:
self.Die("'git commit' failed.")
- if self.Git("cl upload --send-mail", pipe=False) is None:
+ force_flag = " -f" if self._options.f else ""
+ if self.Git("cl upload --send-mail%s" % force_flag, pipe=False) is
None:
self.Die("'git cl upload' failed, please try again.")
print "CL uploaded."
Index: tools/push-to-trunk/test_scripts.py
diff --git a/tools/push-to-trunk/test_scripts.py
b/tools/push-to-trunk/test_scripts.py
index
6ce22de8297462e23d226ae32b6e7f6b0a6add13..a8337095582cc390729bf193230e537b999cfbc2
100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -461,6 +461,7 @@ class ScriptTest(unittest.TestCase):
self.assertTrue(re.search(r"#define PATCH_LEVEL\s+0", version))
self.assertTrue(re.search(r"#define IS_CANDIDATE_VERSION\s+0",
version))
+ force_flag = " -f" if force else ""
self._git_recipe = [
["status -s -uno", ""],
["status -s -b -uno", "## some_branch\n"],
@@ -481,7 +482,8 @@ class ScriptTest(unittest.TestCase):
"Now working on version 3.22.6.\""),
" 2 files changed\n",
CheckPreparePush],
- ["cl upload -r \"[email protected]\" --send-mail", "done\n"],
+ ["cl upload -r \"[email protected]\" --send-mail%s" % force_flag,
+ "done\n"],
["cl dcommit -f", "Closing issue\n"],
["svn fetch", "fetch result\n"],
["checkout svn/bleeding_edge", ""],
@@ -502,7 +504,7 @@ class ScriptTest(unittest.TestCase):
[("commit -am \"Update V8 to version 3.22.5.\n\n"
"[email protected]\""),
""],
- ["cl upload --send-mail", ""],
+ ["cl upload --send-mail%s" % force_flag, ""],
["checkout -f some_branch", ""],
["branch -D %s" % TEST_CONFIG[TEMP_BRANCH], ""],
["branch -D %s" % TEST_CONFIG[BRANCHNAME], ""],
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.