Update the R= line with the actual list of reviewers that approved the CL.
This makes the commit logs much more useful for a build sheriff. Not only he
sees who committed the CL but see who approved it directly at the log. This
should help build sheriffs when they fail to contact the author and want to
fallback on the reviewer for quick questions.
R=dpranke@chromium.org
BUG=76730
Review URL: https://chromiumcodereview.appspot.com/13800021
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@196786 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index 797c4cc..d661065 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -98,11 +98,13 @@
self.calls,
'@%d Expected: <Missing> Actual: %r' % (self._calls_done, args))
expected_args, result = self.calls.pop(0)
- self.assertEquals(
- expected_args,
- args,
- '@%d Expected: %r Actual: %r' % (
- self._calls_done, expected_args, args))
+ # Also logs otherwise it could get caught in a try/finally and be hard to
+ # diagnose.
+ if expected_args != args:
+ msg = '@%d Expected: %r Actual: %r' % (
+ self._calls_done, expected_args, args)
+ git_cl.logging.error(msg)
+ self.fail(msg)
self._calls_done += 1
return result
@@ -284,7 +286,7 @@
((['git', 'checkout', '-q', '-b', 'git-cl-commit'],), ''),
((['git', 'reset', '--soft', 'fake_ancestor_sha'],), ''),
((['git', 'commit', '-m',
- 'Issue: 12345\n\n'
+ 'Issue: 12345\n\nR=john@chromium.org\n\n'
'Review URL: https://codereview.example.com/12345'],),
''),
((['git', 'svn', 'dcommit', '-C50', '--no-rebase', '--rmdir'],),