Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1434)

Unified Diff: git_cl.py

Issue 132233006: Add support for BUG_PREFIX in codereview.settings (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Initial upload Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
===================================================================
--- git_cl.py (revision 244759)
+++ git_cl.py (working copy)
@@ -395,6 +395,9 @@
self.viewvc_url = self._GetConfig('rietveld.viewvc-url', error_ok=True)
return self.viewvc_url
+ def GetBugPrefix(self):
+ return self._GetConfig('rietveld.bug-prefix', error_ok=True)
+
def GetDefaultCCList(self):
return self._GetConfig('rietveld.cc', error_ok=True)
@@ -865,6 +868,7 @@
SetProperty(settings.GetTreeStatusUrl(error_ok=True), 'Tree status URL',
'tree-status-url', False)
SetProperty(settings.GetViewVCUrl(), 'ViewVC URL', 'viewvc-url', True)
+ SetProperty(settings.GetBugPrefix(), 'Bug Prefix', 'bug-prefix', False)
# TODO: configure a default branch to diff against, rather than this
# svn-based hackery.
@@ -949,7 +953,7 @@
regexp = re.compile(self.BUG_LINE)
if not any((regexp.match(line) for line in self._description_lines)):
- self.append_footer('BUG=')
+ self.append_footer('BUG=%s' % settings.GetBugPrefix())
content = gclient_utils.RunEditor(self.description, True,
git_editor=settings.GetGitEditor())
if not content:
@@ -1032,6 +1036,7 @@
SetProperty('private', 'PRIVATE', unset_error_ok=True)
SetProperty('tree-status-url', 'STATUS', unset_error_ok=True)
SetProperty('viewvc-url', 'VIEW_VC', unset_error_ok=True)
+ SetProperty('bug-prefix', 'BUG_PREFIX', unset_error_ok=True)
if 'GERRIT_HOST' in keyvals:
RunGit(['config', 'gerrit.host', keyvals['GERRIT_HOST']])
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698