| OLD | NEW |
| 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 """Client-side script to send a try job to the try server. It communicates to | 5 """Client-side script to send a try job to the try server. It communicates to |
| 6 the try server by either writting to a svn repository or by directly connecting | 6 the try server by either writting to a svn repository or by directly connecting |
| 7 to the server by HTTP. | 7 to the server by HTTP. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import datetime | 10 import datetime |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 group.add_option("--patchset", type='int', | 499 group.add_option("--patchset", type='int', |
| 500 help="Update rietveld issue try job status. This is " | 500 help="Update rietveld issue try job status. This is " |
| 501 "optional if --issue is used, In that case, the " | 501 "optional if --issue is used, In that case, the " |
| 502 "latest patchset will be used.") | 502 "latest patchset will be used.") |
| 503 group.add_option("--dry_run", action='store_true', | 503 group.add_option("--dry_run", action='store_true', |
| 504 help="Just prints the diff and quits") | 504 help="Just prints the diff and quits") |
| 505 parser.add_option_group(group) | 505 parser.add_option_group(group) |
| 506 | 506 |
| 507 group = optparse.OptionGroup(parser, "Try job options") | 507 group = optparse.OptionGroup(parser, "Try job options") |
| 508 group.add_option("-b", "--bot", action="append", | 508 group.add_option("-b", "--bot", action="append", |
| 509 help="Only use specifics build slaves, ex: '--bot win' to " | 509 help="Only use specifics build slaves, ex: " |
| 510 "run the try job only on the 'win' slave; see the try " | 510 "'--bot win,layout_mac'; see the try " |
| 511 "server waterfall for the slave's name") | 511 "server waterfall for the slave's name") |
| 512 group.add_option("-r", "--revision", | 512 group.add_option("-r", "--revision", |
| 513 help="Revision to use for the try job; default: the " | 513 help="Revision to use for the try job; default: the " |
| 514 "revision will be determined by the try server; see " | 514 "revision will be determined by the try server; see " |
| 515 "its waterfall for more info") | 515 "its waterfall for more info") |
| 516 group.add_option("-c", "--clobber", action="store_true", | 516 group.add_option("-c", "--clobber", action="store_true", |
| 517 help="Force a clobber before building; e.g. don't do an " | 517 help="Force a clobber before building; e.g. don't do an " |
| 518 "incremental build") | 518 "incremental build") |
| 519 # TODO(maruel): help="Select a specific configuration, usually 'debug' or " | 519 # TODO(maruel): help="Select a specific configuration, usually 'debug' or " |
| 520 # "'release'" | 520 # "'release'" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 550 "Specify which code review patch to use as the try job " | 550 "Specify which code review patch to use as the try job " |
| 551 "or rietveld instance to update the try job results " | 551 "or rietveld instance to update the try job results " |
| 552 "Default:%default") | 552 "Default:%default") |
| 553 group.add_option("--root", | 553 group.add_option("--root", |
| 554 help="Root to use for the patch; base subdirectory for " | 554 help="Root to use for the patch; base subdirectory for " |
| 555 "patch created in a subdirectory") | 555 "patch created in a subdirectory") |
| 556 group.add_option("-p", "--patchlevel", type='int', metavar="LEVEL", | 556 group.add_option("-p", "--patchlevel", type='int', metavar="LEVEL", |
| 557 help="Used as -pN parameter to patch") | 557 help="Used as -pN parameter to patch") |
| 558 group.add_option("-s", "--sub_rep", action="append", default=[], | 558 group.add_option("-s", "--sub_rep", action="append", default=[], |
| 559 help="Subcheckout to use in addition. This is mainly " | 559 help="Subcheckout to use in addition. This is mainly " |
| 560 "useful for gclient-style checkouts. Use @rev or " | 560 "useful for gclient-style checkouts. In git, checkout " |
| 561 "@branch or @branch1..branch2 to specify the " | 561 "the branch with changes first. Use @rev or " |
| 562 "revision/branch to diff against.") | 562 "@branch to specify the " |
| 563 "revision/branch to diff against. If no @branch is " |
| 564 "given the diff will be against the upstream branch. " |
| 565 "If @branch then the diff is branch..HEAD. " |
| 566 "All edits must be checked in.") |
| 563 group.add_option("--no_gclient", action="store_true", | 567 group.add_option("--no_gclient", action="store_true", |
| 564 help="Disable automatic search for gclient checkout.") | 568 help="Disable automatic search for gclient checkout.") |
| 565 group.add_option("-E", "--exclude", action="append", | 569 group.add_option("-E", "--exclude", action="append", |
| 566 default=['ChangeLog'], metavar='REGEXP', | 570 default=['ChangeLog'], metavar='REGEXP', |
| 567 help="Regexp patterns to exclude files. Default: %default") | 571 help="Regexp patterns to exclude files. Default: %default") |
| 568 parser.add_option_group(group) | 572 parser.add_option_group(group) |
| 569 | 573 |
| 570 group = optparse.OptionGroup(parser, "Access the try server by HTTP") | 574 group = optparse.OptionGroup(parser, "Access the try server by HTTP") |
| 571 group.add_option("--use_http", | 575 group.add_option("--use_http", |
| 572 action="store_const", | 576 action="store_const", |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 print >> sys.stderr, e | 754 print >> sys.stderr, e |
| 751 return 1 | 755 return 1 |
| 752 except gclient_utils.Error, e: | 756 except gclient_utils.Error, e: |
| 753 print >> sys.stderr, e | 757 print >> sys.stderr, e |
| 754 return 1 | 758 return 1 |
| 755 return 0 | 759 return 0 |
| 756 | 760 |
| 757 | 761 |
| 758 if __name__ == "__main__": | 762 if __name__ == "__main__": |
| 759 sys.exit(TryChange(None, [], False)) | 763 sys.exit(TryChange(None, [], False)) |
| OLD | NEW |