Moved EnsureCQIncludeTrybotsAreAdded to OutputApi.
This makes them accessible to presubmit scripts' PostUploadHook.
Fixed bugs where caching needed to be bypassed in order for
sequential PostUploadHooks to see each others' results.
BUG=688765
Change-Id: I56c0c6b6419e2474f4b7f701be036fb2a524f8e3
Reviewed-on: https://chromium-review.googlesource.com/439877
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 8bf9ff2..ccf92eb 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1358,7 +1358,7 @@
def GetDescription(self, pretty=False, force=False):
if not self.has_description or force:
if self.GetIssue():
- self.description = self._codereview_impl.FetchDescription()
+ self.description = self._codereview_impl.FetchDescription(force=force)
self.has_description = True
if pretty:
# Set width to 72 columns + 2 space indent.
@@ -1676,7 +1676,7 @@
"""Returns server URL without end slash, like "https://codereview.com"."""
raise NotImplementedError()
- def FetchDescription(self):
+ def FetchDescription(self, force=False):
"""Fetches and returns description from the codereview server."""
raise NotImplementedError()
@@ -1812,11 +1812,11 @@
if refresh:
authenticator.get_access_token()
- def FetchDescription(self):
+ def FetchDescription(self, force=False):
issue = self.GetIssue()
assert issue
try:
- return self.RpcServer().get_description(issue).strip()
+ return self.RpcServer().get_description(issue, force=force).strip()
except urllib2.HTTPError as e:
if e.code == 404:
DieWithError(
@@ -2401,8 +2401,9 @@
data = self._GetChangeDetail(['CURRENT_REVISION'])
return data['revisions'][data['current_revision']]['_number']
- def FetchDescription(self):
- data = self._GetChangeDetail(['CURRENT_REVISION', 'CURRENT_COMMIT'])
+ def FetchDescription(self, force=False):
+ data = self._GetChangeDetail(['CURRENT_REVISION', 'CURRENT_COMMIT'],
+ no_cache=force)
current_rev = data['current_revision']
return data['revisions'][current_rev]['commit']['message']