OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 the V8 project authors. All rights reserved. |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 VERSION_FILE: "src/version.cc", | 46 VERSION_FILE: "src/version.cc", |
47 CHANGELOG_FILE: "ChangeLog", | 47 CHANGELOG_FILE: "ChangeLog", |
48 CHANGELOG_ENTRY_FILE: "/tmp/v8-push-to-trunk-tempfile-changelog-entry", | 48 CHANGELOG_ENTRY_FILE: "/tmp/v8-push-to-trunk-tempfile-changelog-entry", |
49 PATCH_FILE: "/tmp/v8-push-to-trunk-tempfile-patch-file", | 49 PATCH_FILE: "/tmp/v8-push-to-trunk-tempfile-patch-file", |
50 COMMITMSG_FILE: "/tmp/v8-push-to-trunk-tempfile-commitmsg", | 50 COMMITMSG_FILE: "/tmp/v8-push-to-trunk-tempfile-commitmsg", |
51 DEPS_FILE: "DEPS", | 51 DEPS_FILE: "DEPS", |
52 } | 52 } |
53 | 53 |
54 | 54 |
55 class PushToTrunkOptions(CommonOptions): | 55 class PushToTrunkOptions(CommonOptions): |
| 56 @staticmethod |
| 57 def MakeForcedOptions(reviewer, chrome_path): |
| 58 """Convenience wrapper.""" |
| 59 class Options(object): |
| 60 pass |
| 61 options = Options() |
| 62 options.s = 0 |
| 63 options.l = None |
| 64 options.f = True |
| 65 options.m = False |
| 66 options.r = reviewer |
| 67 options.c = chrome_path |
| 68 return PushToTrunkOptions(options) |
| 69 |
56 def __init__(self, options): | 70 def __init__(self, options): |
57 super(PushToTrunkOptions, self).__init__(options, options.m) | 71 super(PushToTrunkOptions, self).__init__(options, options.m) |
58 self.requires_editor = not options.f | 72 self.requires_editor = not options.f |
59 self.wait_for_lgtm = not options.f | 73 self.wait_for_lgtm = not options.f |
60 self.tbr_commit = not options.m | 74 self.tbr_commit = not options.m |
61 self.l = options.l | 75 self.l = options.l |
62 self.r = options.r | 76 self.r = options.r |
63 self.c = options.c | 77 self.c = options.c |
64 | 78 |
65 class Preparation(Step): | 79 class Preparation(Step): |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 def Main(): | 593 def Main(): |
580 parser = BuildOptions() | 594 parser = BuildOptions() |
581 (options, args) = parser.parse_args() | 595 (options, args) = parser.parse_args() |
582 if not ProcessOptions(options): | 596 if not ProcessOptions(options): |
583 parser.print_help() | 597 parser.print_help() |
584 return 1 | 598 return 1 |
585 RunPushToTrunk(CONFIG, PushToTrunkOptions(options)) | 599 RunPushToTrunk(CONFIG, PushToTrunkOptions(options)) |
586 | 600 |
587 if __name__ == "__main__": | 601 if __name__ == "__main__": |
588 sys.exit(Main()) | 602 sys.exit(Main()) |
OLD | NEW |