Always use latest patchset in git-cl try
Rietveld rejects tryjobs from non-latest patchsets anyway,
change logic to always use latest patchset.
R=iannucci@chromium.org
Review URL: https://chromiumcodereview.appspot.com/22415012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@216023 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl.py b/git_cl.py
index 156d28a..3ee62f6 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2027,9 +2027,12 @@
'Bot list: %s' % builders_and_tests)
return 1
- patchset = cl.GetPatchset()
- if not cl.GetPatchset():
- patchset = cl.GetMostRecentPatchset()
+ patchset = cl.GetMostRecentPatchset()
+ if patchset and patchset != cl.GetPatchset():
+ print(
+ '\nWARNING Mismatch between local config and server. Did a previous '
+ 'upload fail?\ngit-cl try always uses latest patchset from rietveld. '
+ 'Continuing using\npatchset %s.\n' % patchset)
cl.RpcServer().trigger_try_jobs(
cl.GetIssue(), patchset, options.name, options.clobber, options.revision,