Commit c4a7356a authored by Andrii Shyshkalov's avatar Andrii Shyshkalov Committed by Commit Bot

git cl: cache also LABELS data on a change.

This removes 1 RPC when tbr-ing second or later patchset.

Since tests cover TBR only in first upload, there are
no test changes. Since adding test is real PITA here,
keep them as is.

R=ehmaldonado

Change-Id: I90801b06727ce2131a703d6cd6c24ffad798bc8a
Reviewed-on: https://chromium-review.googlesource.com/1242212Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
parent 8e643693
......@@ -2452,7 +2452,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
# Warm change details cache now to avoid RPCs later, reducing latency for
# developers.
self._GetChangeDetail(
['DETAILED_ACCOUNTS', 'CURRENT_REVISION', 'CURRENT_COMMIT'])
['DETAILED_ACCOUNTS', 'CURRENT_REVISION', 'CURRENT_COMMIT', 'LABELS'])
status = self._GetChangeDetail()['status']
if status in ('MERGED', 'ABANDONED'):
......
......@@ -1088,7 +1088,8 @@ class TestGitCl(TestCase):
calls += [
(('GetChangeDetail', 'chromium-review.googlesource.com',
'my%2Frepo~123456',
['DETAILED_ACCOUNTS', 'CURRENT_REVISION', 'CURRENT_COMMIT']),
['DETAILED_ACCOUNTS', 'CURRENT_REVISION', 'CURRENT_COMMIT', 'LABELS']
),
{
'owner': {'email': (other_cl_owner or 'owner@example.com')},
'change_id': '123456789',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment