From 258ac97bac035ef6a35d86120183840052e88fcc Mon Sep 17 00:00:00 2001 From: "machenbach@chromium.org" Date: Wed, 3 Sep 2014 11:59:43 +0000 Subject: [PATCH] Correctly overwrite author in chromium roll script. BUG=408523 LOG=n R=jarin@chromium.org TBR=jarin@chromium.org Review URL: https://codereview.chromium.org/535073002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- tools/push-to-trunk/chromium_roll.py | 3 ++- tools/push-to-trunk/git_recipes.py | 4 +++- tools/push-to-trunk/test_scripts.py | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/push-to-trunk/chromium_roll.py b/tools/push-to-trunk/chromium_roll.py index 03f18f6..e6c3086 100755 --- a/tools/push-to-trunk/chromium_roll.py +++ b/tools/push-to-trunk/chromium_roll.py @@ -86,7 +86,8 @@ class UploadCL(Step): sheriff = ("\n\nPlease reply to the V8 sheriff %s in case of problems." % self["sheriff"]) self.GitCommit("%s%s\n\nTBR=%s" % - (commit_title, sheriff, self._options.reviewer)) + (commit_title, sheriff, self._options.reviewer), + author=self._options.author) if not self._options.dry_run: self.GitUpload(author=self._options.author, force=True, diff --git a/tools/push-to-trunk/git_recipes.py b/tools/push-to-trunk/git_recipes.py index 1cbd8f5..96fa05a 100644 --- a/tools/push-to-trunk/git_recipes.py +++ b/tools/push-to-trunk/git_recipes.py @@ -167,13 +167,15 @@ class GitRecipesMixin(object): # base files were uploaded, if not retry. self.Git(MakeArgs(args), pipe=False) - def GitCommit(self, message="", file_name=""): + def GitCommit(self, message="", file_name="", author=None): assert message or file_name args = ["commit"] if file_name: args += ["-aF", Quoted(file_name)] if message: args += ["-am", Quoted(message)] + if author: + args += ["--author", "\"%s <%s>\"" % (author, author)] self.Git(MakeArgs(args)) def GitPresubmit(self): diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index 71b8a05..bb41cf1 100644 --- a/tools/push-to-trunk/test_scripts.py +++ b/tools/push-to-trunk/test_scripts.py @@ -842,7 +842,8 @@ def get_list(): Cmd(("git commit -am \"Update V8 to version 3.22.5 " "(based on bleeding_edge revision r123454).\n\n" "Please reply to the V8 sheriff c_name@chromium.org in " - "case of problems.\n\nTBR=c_name@chromium.org\""), + "case of problems.\n\nTBR=c_name@chromium.org\" " + "--author \"author@chromium.org \""), ""), Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f", ""), ] -- 2.7.4