mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
git-cl: Remove GetIsGerrit.
It's always true. Change-Id: I96a53c032de705724e61c64ee37e9a14b596cbd5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2113250 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This commit is contained in:
11
git_cl.py
11
git_cl.py
@@ -832,12 +832,6 @@ class Settings(object):
|
||||
def GetDefaultCCList(self):
|
||||
return self._GetConfig('rietveld.cc')
|
||||
|
||||
def GetIsGerrit(self):
|
||||
"""Returns True if this repo is associated with Gerrit."""
|
||||
if self.is_gerrit is None:
|
||||
self.is_gerrit = self._GetConfig('gerrit.host').lower() == 'true'
|
||||
return self.is_gerrit
|
||||
|
||||
def GetSquashGerritUploads(self):
|
||||
"""Returns True if uploads to Gerrit should be squashed by default."""
|
||||
if self.squash_gerrit_uploads is None:
|
||||
@@ -3023,8 +3017,6 @@ def DownloadGerritHook(force):
|
||||
Args:
|
||||
force: True to update hooks. False to install hooks if not present.
|
||||
"""
|
||||
if not settings.GetIsGerrit():
|
||||
return
|
||||
src = 'https://gerrit-review.googlesource.com/tools/hooks/commit-msg'
|
||||
dst = os.path.join(settings.GetRoot(), '.git', 'hooks', 'commit-msg')
|
||||
if not os.access(dst, os.X_OK):
|
||||
@@ -4302,9 +4294,6 @@ def CMDupload(parser, args):
|
||||
if options.use_commit_queue:
|
||||
options.send_mail = True
|
||||
|
||||
# For sanity of test expectations, do this otherwise lazy-loading *now*.
|
||||
settings.GetIsGerrit()
|
||||
|
||||
cl = Changelist()
|
||||
# Warm change details cache now to avoid RPCs later, reducing latency for
|
||||
# developers.
|
||||
|
||||
@@ -3453,7 +3453,6 @@ class CMDUploadTestCase(CMDTestCaseBase):
|
||||
mock.patch('git_cl._fetch_tryjobs').start()
|
||||
mock.patch('git_cl._trigger_tryjobs', return_value={}).start()
|
||||
mock.patch('git_cl.Changelist.CMDUpload', return_value=0).start()
|
||||
mock.patch('git_cl.Settings.GetIsGerrit', return_value=True).start()
|
||||
self.addCleanup(mock.patch.stopall)
|
||||
|
||||
def testWarmUpChangeDetailCache(self):
|
||||
|
||||
Reference in New Issue
Block a user