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

Side by Side Diff: trychange.py

Issue 5995003: Workaround the fact that pylint calls sys.exit(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: fix presubmit check while at it Created 10 years 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 | « presubmit_canned_checks.py ('k') | 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/python 1 #!/usr/bin/python
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2009 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 """Client-side script to send a try job to the try server. It communicates to 6 """Client-side script to send a try job to the try server. It communicates to
7 the try server by either writting to a svn repository or by directly connecting 7 the try server by either writting to a svn repository or by directly connecting
8 to the server by HTTP. 8 to the server by HTTP.
9 """ 9 """
10 10
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 if options.issue or options.patchset: 649 if options.issue or options.patchset:
650 parser.error('Cannot use both --issue and use a review number url') 650 parser.error('Cannot use both --issue and use a review number url')
651 options.issue = int(match.group(2)) 651 options.issue = int(match.group(2))
652 options.rietveld_url = match.group(1) 652 options.rietveld_url = match.group(1)
653 653
654 try: 654 try:
655 # Always include os.getcwd() in the checkout settings. 655 # Always include os.getcwd() in the checkout settings.
656 checkouts = [] 656 checkouts = []
657 path = os.getcwd() 657 path = os.getcwd()
658 if options.upstream_branch: 658 if options.upstream_branch:
659 path += '@' + options.upstream_branch 659 path += '@' + options.upstream_branch
660 checkouts.append(GuessVCS(options, path)) 660 checkouts.append(GuessVCS(options, path))
661 checkouts[0].AutomagicalSettings() 661 checkouts[0].AutomagicalSettings()
662 for item in options.sub_rep: 662 for item in options.sub_rep:
663 checkout = GuessVCS(options, os.path.join(checkouts[0].checkout_root, 663 checkout = GuessVCS(options, os.path.join(checkouts[0].checkout_root,
664 item)) 664 item))
665 if checkout.checkout_root in [c.checkout_root for c in checkouts]: 665 if checkout.checkout_root in [c.checkout_root for c in checkouts]:
666 parser.error('Specified the root %s two times.' % 666 parser.error('Specified the root %s two times.' %
667 checkout.checkout_root) 667 checkout.checkout_root)
668 checkouts.append(checkout) 668 checkouts.append(checkout)
669 669
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 print >> sys.stderr, e 765 print >> sys.stderr, e
766 return 1 766 return 1
767 except gclient_utils.Error, e: 767 except gclient_utils.Error, e:
768 print >> sys.stderr, e 768 print >> sys.stderr, e
769 return 1 769 return 1
770 return 0 770 return 0
771 771
772 772
773 if __name__ == "__main__": 773 if __name__ == "__main__":
774 sys.exit(TryChange(None, [], False)) 774 sys.exit(TryChange(None, [], False))
OLDNEW
« no previous file with comments | « presubmit_canned_checks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698