From 4b39c5fe44a2b6b23a7f8c407964aaaa617cbeb5 Mon Sep 17 00:00:00 2001 From: "sergiyb@chromium.org" Date: Tue, 7 Jul 2015 10:33:12 +0000 Subject: [PATCH] Add a space before period in review URL This is needed to ensure that it resolves to a correct URL on Gitiles. R=maruel@chromium.org, smut@google.com Review URL: https://codereview.chromium.org/1225713002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295932 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cl.py | 6 ++++-- tests/git_cl_test.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/git_cl.py b/git_cl.py index f99f5e99a2..bad7c57ac8 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2545,8 +2545,10 @@ def SendUpstream(parser, args, cmd): commit_desc = ChangeDescription(change_desc.description) if cl.GetIssue(): # Xcode won't linkify this URL unless there is a non-whitespace character - # after it. Add a period on a new line to circumvent this. - commit_desc.append_footer('Review URL: %s.' % cl.GetIssueURL()) + # 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()) 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 293523daa0..220e591643 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -360,7 +360,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',