From f01be229a7dffe7c6a7ddb541d6e3b053a6bd396 Mon Sep 17 00:00:00 2001 From: Andrii Shyshkalov Date: Thu, 8 Dec 2016 19:21:13 +0100 Subject: [PATCH] git cl: insert "Review-Url" instead "Review URL" footer like CQ. R=sergiyb@chromium.org Change-Id: I2df867e381ceb1035add84563d3b444b0ee0ea94 Reviewed-on: https://chromium-review.googlesource.com/417267 Reviewed-by: Sergiy Byelozyorov Commit-Queue: Andrii Shyshkalov --- git_cl.py | 2 +- tests/git_cl_test.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/git_cl.py b/git_cl.py index 8b7c4ea7f..95d673dc1 100755 --- a/git_cl.py +++ b/git_cl.py @@ -4586,7 +4586,7 @@ def SendUpstream(parser, args, cmd): # after it. Add a period on a new line to circumvent this. Also add a space # before the period to make sure that Gitiles continues to correctly resolve # the URL. - commit_desc.append_footer('Review URL: %s .' % cl.GetIssueURL()) + commit_desc.append_footer('Review-Url: %s .' % cl.GetIssueURL()) if options.contributor: commit_desc.append_footer('Patch from %s.' % options.contributor) diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index 6b6fa89d5..de6ebcce3 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -749,7 +749,7 @@ class TestGitCl(TestCase): ((['git', 'reset', '--soft', 'fake_ancestor_sha'],), ''), ((['git', 'commit', '-m', 'Issue: 12345\n\nR=john@chromium.org\n\n' - 'Review URL: https://codereview.example.com/12345 .'],), + 'Review-Url: https://codereview.example.com/12345 .'],), ''), ((['git', 'config', 'rietveld.force-https-commit-url'],), ''), ((['git', @@ -1011,7 +1011,7 @@ class TestGitCl(TestCase): ((['git', 'reset', '--soft', 'fake_ancestor_sha'],), ''), ((['git', 'commit', '-m', 'Issue: 123\n\nR=john@chromium.org\n\n' - 'Review URL: https://codereview.chromium.org/123 .'],), ''), + 'Review-Url: https://codereview.chromium.org/123 .'],), ''), ((['git', 'config', 'branch.feature.merge'],), 'refs/heads/master'), ((['git', 'config', 'branch.feature.remote'],), 'origin'), ((['git', 'config', '--get', 'remote.origin.url'],), @@ -1115,8 +1115,7 @@ class TestGitCl(TestCase): ((['git', 'commit', '--amend', '-m', 'Issue: 123\n\nR=john@chromium.org\n' '\n' - 'Review URL: https://codereview.chromium.org/123 .\n' - '\n' + 'Review-Url: https://codereview.chromium.org/123 .\n' 'Cr-Commit-Position: refs/heads/master@{#544}\n' 'Cr-Branched-From: refs/svn/2014@{#2208}'],), ''), @@ -1130,8 +1129,7 @@ class TestGitCl(TestCase): ((['update_description', 123, 'Issue: 123\n\nR=john@chromium.org\n' '\n' - 'Review URL: https://codereview.chromium.org/123 .\n' - '\n' + 'Review-Url: https://codereview.chromium.org/123 .\n' 'Cr-Commit-Position: refs/heads/master@{#544}\n' 'Cr-Branched-From: refs/svn/2014@{#2208}\n' 'Committed: '