Force 'git cl upload' in push-to-trunk forced mode.
R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/77853003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
df38e6f9a6
commit
718b38648f
@ -370,14 +370,17 @@ class UploadStep(Step):
|
|||||||
Step.__init__(self, "Upload for code review.")
|
Step.__init__(self, "Upload for code review.")
|
||||||
|
|
||||||
def RunStep(self):
|
def RunStep(self):
|
||||||
if self._options and self._options.r:
|
if self._options.r:
|
||||||
print "Using account %s for review." % self._options.r
|
print "Using account %s for review." % self._options.r
|
||||||
reviewer = self._options.r
|
reviewer = self._options.r
|
||||||
else:
|
else:
|
||||||
print "Please enter the email address of a V8 reviewer for your patch: ",
|
print "Please enter the email address of a V8 reviewer for your patch: ",
|
||||||
self.DieInForcedMode("A reviewer must be specified in forced mode.")
|
self.DieInForcedMode("A reviewer must be specified in forced mode.")
|
||||||
reviewer = self.ReadLine()
|
reviewer = self.ReadLine()
|
||||||
args = "cl upload -r \"%s\" --send-mail" % reviewer
|
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:
|
if self.Git(args, pipe=False) is None:
|
||||||
self.Die("'git cl upload' failed, please try again.")
|
self.Die("'git cl upload' failed, please try again.")
|
||||||
|
|
||||||
|
@ -457,7 +457,8 @@ class UploadCL(Step):
|
|||||||
args = "commit -am \"Update V8 to version %s.\n\nTBR=%s\"" % (ver, rev)
|
args = "commit -am \"Update V8 to version %s.\n\nTBR=%s\"" % (ver, rev)
|
||||||
if self.Git(args) is None:
|
if self.Git(args) is None:
|
||||||
self.Die("'git commit' failed.")
|
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.")
|
self.Die("'git cl upload' failed, please try again.")
|
||||||
print "CL uploaded."
|
print "CL uploaded."
|
||||||
|
|
||||||
|
@ -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 PATCH_LEVEL\s+0", version))
|
||||||
self.assertTrue(re.search(r"#define IS_CANDIDATE_VERSION\s+0", version))
|
self.assertTrue(re.search(r"#define IS_CANDIDATE_VERSION\s+0", version))
|
||||||
|
|
||||||
|
force_flag = " -f" if force else ""
|
||||||
self._git_recipe = [
|
self._git_recipe = [
|
||||||
["status -s -uno", ""],
|
["status -s -uno", ""],
|
||||||
["status -s -b -uno", "## some_branch\n"],
|
["status -s -b -uno", "## some_branch\n"],
|
||||||
@ -481,7 +482,8 @@ class ScriptTest(unittest.TestCase):
|
|||||||
"Now working on version 3.22.6.\""),
|
"Now working on version 3.22.6.\""),
|
||||||
" 2 files changed\n",
|
" 2 files changed\n",
|
||||||
CheckPreparePush],
|
CheckPreparePush],
|
||||||
["cl upload -r \"reviewer@chromium.org\" --send-mail", "done\n"],
|
["cl upload -r \"reviewer@chromium.org\" --send-mail%s" % force_flag,
|
||||||
|
"done\n"],
|
||||||
["cl dcommit -f", "Closing issue\n"],
|
["cl dcommit -f", "Closing issue\n"],
|
||||||
["svn fetch", "fetch result\n"],
|
["svn fetch", "fetch result\n"],
|
||||||
["checkout svn/bleeding_edge", ""],
|
["checkout svn/bleeding_edge", ""],
|
||||||
@ -502,7 +504,7 @@ class ScriptTest(unittest.TestCase):
|
|||||||
[("commit -am \"Update V8 to version 3.22.5.\n\n"
|
[("commit -am \"Update V8 to version 3.22.5.\n\n"
|
||||||
"TBR=reviewer@chromium.org\""),
|
"TBR=reviewer@chromium.org\""),
|
||||||
""],
|
""],
|
||||||
["cl upload --send-mail", ""],
|
["cl upload --send-mail%s" % force_flag, ""],
|
||||||
["checkout -f some_branch", ""],
|
["checkout -f some_branch", ""],
|
||||||
["branch -D %s" % TEST_CONFIG[TEMP_BRANCH], ""],
|
["branch -D %s" % TEST_CONFIG[TEMP_BRANCH], ""],
|
||||||
["branch -D %s" % TEST_CONFIG[BRANCHNAME], ""],
|
["branch -D %s" % TEST_CONFIG[BRANCHNAME], ""],
|
||||||
|
Loading…
Reference in New Issue
Block a user