git-cl: Make BUG_LINE_FORMAT configurable in codereview.settings
The default BUG_LINE_FORMAT is the existing BUG=%s. Projects that wish
to begin using Gerrit-style footers like Bug: %s can now set this in
codereview.settings.
BUG=616753
Change-Id: I4470311a86db228eab2a1655ae884736cce8c380
Reviewed-on: https://chromium-review.googlesource.com/451565
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index c40fb72..8bd7fb3 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -501,14 +501,14 @@
'\nIF YOU SEE THIS, READ BELOW, IT WILL SAVE YOUR TIME!\n'
'There are un-consumed self.calls after this test has finished.\n'
'If you don\'t know which test this is, run:\n'
- ' tests/git_cl_tests.py -v\n'
+ ' tests/git_cl_test.py -v\n'
'\n'
'If you are already running just this single test, then **first** '
'fix the problem whose exception is emitted below by unittest '
'runner.\n'
'\n'
'Else, to be sure what\'s going on, run this test **alone** with \n'
- ' tests/git_cl_tests.py TestGitCl.<name>\n'
+ ' tests/git_cl_test.py TestGitCl.<name>\n'
'and follow instructions above.\n' +
'=' * 80)
finally:
@@ -557,6 +557,7 @@
((['git', 'config', '--unset-all', 'rietveld.private'],), CERR1),
((['git', 'config', '--unset-all', 'rietveld.tree-status-url'],), CERR1),
((['git', 'config', '--unset-all', 'rietveld.viewvc-url'],), CERR1),
+ ((['git', 'config', '--unset-all', 'rietveld.bug-line-format'],), CERR1),
((['git', 'config', '--unset-all', 'rietveld.bug-prefix'],), CERR1),
((['git', 'config', '--unset-all', 'rietveld.cpplint-regex'],), CERR1),
((['git', 'config', '--unset-all', 'rietveld.cpplint-ignore-regex'],),
@@ -640,7 +641,8 @@
((['git', 'log', '--pretty=format:%s\n\n%b',
'fake_ancestor_sha..HEAD'],),
'desc\n'),
- ((['git', 'config', 'rietveld.bug-prefix'],), ''),
+ ((['git', 'config', 'rietveld.bug-prefix'],), CERR1),
+ ((['git', 'config', 'rietveld.bug-line-format'],), CERR1),
]
@classmethod
@@ -2157,6 +2159,7 @@
((['git', 'config', 'branch.feature.gerritissue'],), '123'),
((['git', 'config', 'rietveld.autoupdate'],), CERR1),
((['git', 'config', 'rietveld.bug-prefix'],), CERR1),
+ ((['git', 'config', 'rietveld.bug-line-format'],), CERR1),
((['git', 'config', 'core.editor'],), 'vi'),
]
self.assertEqual(0, git_cl.main(['description', '--gerrit']))