git cl try-results regression tests for Gerrit.
The flow looks like this:
$ git cl status
Branches associated with reviews:
gerrit-4483 : https://chromium-review.googlesource.com/381231 (waiting)
$ git cl try-results
Warning: Codereview server has newer patchsets (2) than most recent
upload from local checkout (None). Did a previous upload fail?
By default, git cl try uses latest patchset from codereview,
continuing using such patchset 2.
Warning: Some results might be missing because You are not logged in.
Please login first by running:
depot-tools-auth login chromium-review.googlesource.com
Started:
Infra Linux Precise 32 Tester https://luci-milo.appspot.com/swarming/...
Infra Linux Trusty 64 Tester https://luci-milo.appspot.com/swarming/...
Total: 2 try jobs
$ depot-tools-auth login chromium-review.googlesource.com
<<<auth in my browser>>>
Logged in to chromium-review.googlesource.com as <some@email.com>
To login with a different email run:
depot-tools-auth login chromium-review.googlesource.com
To logout and purge the authentication token run:
depot-tools-auth logout chromium-review.googlesource.com
$ git config branch.gerrit-4483.gerritpatchset 2
$ git cl try-results
Started:
Infra Linux Precise 32 Tester https://luci-milo.appspot.com/swarming/...
Infra Linux Trusty 64 Tester https://luci-milo.appspot.com/swarming/...
Infra Mac Tester https://luci-milo.appspot.com/swarming/...
Total: 3 try jobs
R=sergiyb@chromium.org,emso@chromium.org
BUG=599931
TEST=new unittests + end-to-end local.
Review-Url: https://codereview.chromium.org/2392463009
diff --git a/git_cl.py b/git_cl.py
index 381d8db..857bf37 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -4880,10 +4880,12 @@
cl.GetIssue())
if patchset != cl.GetPatchset():
- print('WARNING: Mismatch between local config and server. Did a previous '
- 'upload fail?\n'
- 'By default, git cl try uses latest patchset from codereview.\n'
- 'Continuing using patchset %s.\n' % patchset)
+ print('Warning: Codereview server has newer patchsets (%s) than most '
+ 'recent upload from local checkout (%s). Did a previous upload '
+ 'fail?\n'
+ 'By default, git cl try uses latest patchset from codereview, '
+ 'continuing to use patchset %s.\n' %
+ (patchset, cl.GetPatchset(), patchset))
try:
jobs = fetch_try_jobs(auth_config, cl, options.buildbucket_host, patchset)
except BuildbucketResponseException as ex: