From 4c61dccd9dbddc3e174fdb73b13732ea0e36507d Mon Sep 17 00:00:00 2001 From: "smut@google.com" Date: Mon, 8 Jun 2015 22:31:29 +0000 Subject: [PATCH] Add period below review URL when adding review URL footer to committed CLs Because some interfaces aren't linkifying the URL when the commit message ends with it. BUG=480922 TESTED=tests/git_cl_test.py; presubmit ok Review URL: https://codereview.chromium.org/1165293002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295566 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cl.py | 4 +++- tests/git_cl_test.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/git_cl.py b/git_cl.py index 26f04fd8c..5ff11fc15 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2394,7 +2394,9 @@ def SendUpstream(parser, args, cmd): commit_desc = ChangeDescription(change_desc.description) if cl.GetIssue(): - commit_desc.append_footer('Review URL: %s' % cl.GetIssueURL()) + # 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()) 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 54878ebf3..cb87bdb4c 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -359,7 +359,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',