Commit f2745256 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

Fix backport_node script.

- Change indentation from 4 to 2 in accordance with Node.js guidelines.
- Fix --no-review option.

R=petermarshall@chromium.org

Change-Id: Ia525297292b0f13776e2264d5cf82dcc7ec449ad
Reviewed-on: https://chromium-review.googlesource.com/574860Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46778}
parent 76880ea7
......@@ -75,12 +75,12 @@ def CreateCommit(options):
body = subprocess.check_output(
["git", "log", options.commit, "-1", "--format=%B"],
cwd=options.v8_path).strip()
body = '\n'.join(" " + line for line in body.splitlines())
body = '\n'.join(" " + line for line in body.splitlines())
message = title + "\n\nOriginal commit message:\n\n" + body
# Create commit at target.
review_message = "" if options.no_review else "-e"
review_message = "--no-edit" if options.no_review else "--edit"
git_commands = [
["git", "checkout", "-b", "backport_%s" % shorthash], # new branch
["git", "add", TARGET_SUBDIR], # add files
......
......@@ -54,7 +54,7 @@ class TestUpdateNode(unittest.TestCase):
# Check message.
message = subprocess.check_output(['git', 'log', '-1', '--format=%B'], cwd=node_cwd)
self.assertIn('Original commit message:\n\n Title\n\n Body', message)
self.assertIn('Original commit message:\n\n Title\n\n Body', message)
# Check patch.
gitlog = subprocess.check_output(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment