Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: git_cl.py

Issue 22415012: Always use latest patchset in git-cl try (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: improved msg Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Copyright (C) 2008 Evan Martin <martine@danga.com> 6 # Copyright (C) 2008 Evan Martin <martine@danga.com>
7 7
8 """A git-command for integrating reviews on Rietveld.""" 8 """A git-command for integrating reviews on Rietveld."""
9 9
10 import difflib 10 import difflib
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 if t != ['compile']) 2020 if t != ['compile'])
2021 2021
2022 if any('triggered' in b for b in builders_and_tests): 2022 if any('triggered' in b for b in builders_and_tests):
2023 print >> sys.stderr, ( 2023 print >> sys.stderr, (
2024 'ERROR You are trying to send a job to a triggered bot. This type of' 2024 'ERROR You are trying to send a job to a triggered bot. This type of'
2025 ' bot requires an\ninitial job from a parent (usually a builder). ' 2025 ' bot requires an\ninitial job from a parent (usually a builder). '
2026 'Instead send your job to the parent.\n' 2026 'Instead send your job to the parent.\n'
2027 'Bot list: %s' % builders_and_tests) 2027 'Bot list: %s' % builders_and_tests)
2028 return 1 2028 return 1
2029 2029
2030 patchset = cl.GetPatchset() 2030 patchset = cl.GetMostRecentPatchset()
2031 if not cl.GetPatchset(): 2031 if patchset and patchset != cl.GetPatchset():
2032 patchset = cl.GetMostRecentPatchset() 2032 print(
2033 '\nWARNING Mismatch between local config and server. Did a previous '
2034 'upload fail?\ngit-cl try always uses latest patchset from rietveld. '
2035 'Continuing using\npatchset %s.\n' % patchset)
2033 2036
2034 cl.RpcServer().trigger_try_jobs( 2037 cl.RpcServer().trigger_try_jobs(
2035 cl.GetIssue(), patchset, options.name, options.clobber, options.revision, 2038 cl.GetIssue(), patchset, options.name, options.clobber, options.revision,
2036 builders_and_tests) 2039 builders_and_tests)
2037 print('Tried jobs on:') 2040 print('Tried jobs on:')
2038 length = max(len(builder) for builder in builders_and_tests) 2041 length = max(len(builder) for builder in builders_and_tests)
2039 for builder in sorted(builders_and_tests): 2042 for builder in sorted(builders_and_tests):
2040 print ' %*s: %s' % (length, builder, ','.join(builders_and_tests[builder])) 2043 print ' %*s: %s' % (length, builder, ','.join(builders_and_tests[builder]))
2041 return 0 2044 return 0
2042 2045
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 GenUsage(parser, 'help') 2277 GenUsage(parser, 'help')
2275 return CMDhelp(parser, argv) 2278 return CMDhelp(parser, argv)
2276 2279
2277 2280
2278 if __name__ == '__main__': 2281 if __name__ == '__main__':
2279 # These affect sys.stdout so do it outside of main() to simplify mocks in 2282 # These affect sys.stdout so do it outside of main() to simplify mocks in
2280 # unit testing. 2283 # unit testing.
2281 fix_encoding.fix_encoding() 2284 fix_encoding.fix_encoding()
2282 colorama.init() 2285 colorama.init()
2283 sys.exit(main(sys.argv[1:])) 2286 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698