From 36e420ba8b1994455e745f218ac8204163cdf491 Mon Sep 17 00:00:00 2001 From: "ilevy@chromium.org" Date: Tue, 6 Aug 2013 23:21:12 +0000 Subject: [PATCH] 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 --- git_cl.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/git_cl.py b/git_cl.py index 156d28a6e..3ee62f6b3 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2027,9 +2027,12 @@ def CMDtry(parser, args): '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,