OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 the V8 project authors. All rights reserved. | 2 # Copyright 2014 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 DOT_GIT_LOCATION: ".git", | 45 DOT_GIT_LOCATION: ".git", |
46 VERSION_FILE: "src/version.cc", | 46 VERSION_FILE: "src/version.cc", |
47 TEMPORARY_PATCH_FILE: "/tmp/v8-prepare-merge-tempfile-temporary-patch", | 47 TEMPORARY_PATCH_FILE: "/tmp/v8-prepare-merge-tempfile-temporary-patch", |
48 COMMITMSG_FILE: "/tmp/v8-prepare-merge-tempfile-commitmsg", | 48 COMMITMSG_FILE: "/tmp/v8-prepare-merge-tempfile-commitmsg", |
49 COMMIT_HASHES_FILE: "/tmp/v8-merge-to-branch-tempfile-PATCH_COMMIT_HASHES", | 49 COMMIT_HASHES_FILE: "/tmp/v8-merge-to-branch-tempfile-PATCH_COMMIT_HASHES", |
50 } | 50 } |
51 | 51 |
52 | 52 |
53 class MergeToBranchOptions(CommonOptions): | 53 class MergeToBranchOptions(CommonOptions): |
54 def __init__(self, options, args): | 54 def __init__(self, options, args): |
55 super(MergeToBranchOptions, self).__init__(options, options.m) | 55 super(MergeToBranchOptions, self).__init__(options, True) |
56 self.requires_editor = True | 56 self.requires_editor = True |
57 self.wait_for_lgtm = True | 57 self.wait_for_lgtm = True |
58 self.delete_sentinel = options.f | 58 self.delete_sentinel = options.f |
59 self.message = options.m | 59 self.message = getattr(options, "message", "") |
60 self.revert = "--reverse" if getattr(options, "r", None) else "" | 60 self.revert = "--reverse" if getattr(options, "r", None) else "" |
61 self.revert_bleeding_edge = getattr(options, "revert_bleeding_edge", False) | 61 self.revert_bleeding_edge = getattr(options, "revert_bleeding_edge", False) |
62 self.patch = getattr(options, "p", "") | 62 self.patch = getattr(options, "p", "") |
63 self.args = args | 63 self.args = args |
64 | 64 |
65 | 65 |
66 class Preparation(Step): | 66 class Preparation(Step): |
67 MESSAGE = "Preparation." | 67 MESSAGE = "Preparation." |
68 | 68 |
69 def RunStep(self): | 69 def RunStep(self): |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 def Main(): | 397 def Main(): |
398 parser = BuildOptions() | 398 parser = BuildOptions() |
399 (options, args) = parser.parse_args() | 399 (options, args) = parser.parse_args() |
400 if not ProcessOptions(options, args): | 400 if not ProcessOptions(options, args): |
401 parser.print_help() | 401 parser.print_help() |
402 return 1 | 402 return 1 |
403 RunMergeToBranch(CONFIG, MergeToBranchOptions(options, args)) | 403 RunMergeToBranch(CONFIG, MergeToBranchOptions(options, args)) |
404 | 404 |
405 if __name__ == "__main__": | 405 if __name__ == "__main__": |
406 sys.exit(Main()) | 406 sys.exit(Main()) |
OLD | NEW |