| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 parser.add_option_group(group) | 605 parser.add_option_group(group) |
| 606 | 606 |
| 607 group = optparse.OptionGroup(parser, "Access the try server by HTTP") | 607 group = optparse.OptionGroup(parser, "Access the try server by HTTP") |
| 608 group.add_option("--use_http", | 608 group.add_option("--use_http", |
| 609 action="store_const", | 609 action="store_const", |
| 610 const=_SendChangeHTTP, | 610 const=_SendChangeHTTP, |
| 611 dest="send_patch", | 611 dest="send_patch", |
| 612 help="Use HTTP to talk to the try server [default]") | 612 help="Use HTTP to talk to the try server [default]") |
| 613 group.add_option("-H", "--host", | 613 group.add_option("-H", "--host", |
| 614 help="Host address") | 614 help="Host address") |
| 615 group.add_option("-P", "--port", | 615 group.add_option("-P", "--port", type="int", |
| 616 help="HTTP port") | 616 help="HTTP port") |
| 617 group.add_option("--proxy", | 617 group.add_option("--proxy", |
| 618 help="HTTP proxy") | 618 help="HTTP proxy") |
| 619 parser.add_option_group(group) | 619 parser.add_option_group(group) |
| 620 | 620 |
| 621 group = optparse.OptionGroup(parser, "Access the try server with SVN") | 621 group = optparse.OptionGroup(parser, "Access the try server with SVN") |
| 622 group.add_option("--use_svn", | 622 group.add_option("--use_svn", |
| 623 action="store_const", | 623 action="store_const", |
| 624 const=_SendChangeSVN, | 624 const=_SendChangeSVN, |
| 625 dest="send_patch", | 625 dest="send_patch", |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 return 1 | 809 return 1 |
| 810 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 810 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
| 811 print >> sys.stderr, e | 811 print >> sys.stderr, e |
| 812 return 1 | 812 return 1 |
| 813 return 0 | 813 return 0 |
| 814 | 814 |
| 815 | 815 |
| 816 if __name__ == "__main__": | 816 if __name__ == "__main__": |
| 817 fix_encoding.fix_encoding() | 817 fix_encoding.fix_encoding() |
| 818 sys.exit(TryChange(None, None, False)) | 818 sys.exit(TryChange(None, None, False)) |
| OLD | NEW |