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

Unified Diff: git_cl.py

Issue 1876923002: Small refactor git cl py. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@R200
Patch Set: Created 4 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index 734f9a433ce78249b63af740dd5291d0664b56fd..dfab1fa2a25b9522097eac12a4653bfee97dd702 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1451,10 +1451,10 @@ class _ChangelistCodereviewBase(object):
@classmethod
def IssueSetting(cls, branch):
- return 'branch.%s.%s' % (branch, cls.IssueSettingPrefix())
+ return 'branch.%s.%s' % (branch, cls.IssueSettingSuffix())
@classmethod
- def IssueSettingPrefix(cls):
+ def IssueSettingSuffix(cls):
"""Returns name of git config setting which stores issue number for a given
branch."""
raise NotImplementedError()
@@ -1675,7 +1675,7 @@ class _RietveldChangelistImpl(_ChangelistCodereviewBase):
return self._rpc_server
@classmethod
- def IssueSettingPrefix(cls):
+ def IssueSettingSuffix(cls):
return 'rietveldissue'
def PatchsetSetting(self):
@@ -1968,7 +1968,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
return self._gerrit_server
@classmethod
- def IssueSettingPrefix(cls):
+ def IssueSettingSuffix(cls):
return 'gerritissue'
def EnsureAuthenticated(self):
@@ -4576,7 +4576,7 @@ def CMDcheckout(parser, args):
branches = []
for cls in _CODEREVIEW_IMPLEMENTATIONS.values():
- branches.extend(find_issues(cls.IssueSettingPrefix()))
+ branches.extend(find_issues(cls.IssueSettingSuffix()))
if len(branches) == 0:
print 'No branch found for issue %s.' % target_issue
return 1
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698