| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 TextToFile(self["new_commit_msg"], self.Config(COMMITMSG_FILE)) | 175 TextToFile(self["new_commit_msg"], self.Config(COMMITMSG_FILE)) |
| 176 | 176 |
| 177 | 177 |
| 178 class ApplyPatches(Step): | 178 class ApplyPatches(Step): |
| 179 MESSAGE = "Apply patches for selected revisions." | 179 MESSAGE = "Apply patches for selected revisions." |
| 180 | 180 |
| 181 def RunStep(self): | 181 def RunStep(self): |
| 182 for commit_hash in self["patch_commit_hashes"]: | 182 for commit_hash in self["patch_commit_hashes"]: |
| 183 print("Applying patch for %s to %s..." | 183 print("Applying patch for %s to %s..." |
| 184 % (commit_hash, self["merge_to_branch"])) | 184 % (commit_hash, self["merge_to_branch"])) |
| 185 patch = self.GitLog(n=1, patch=True, git_hash=commit_hash) | 185 patch = self.GitGetPatch(commit_hash) |
| 186 TextToFile(patch, self.Config(TEMPORARY_PATCH_FILE)) | 186 TextToFile(patch, self.Config(TEMPORARY_PATCH_FILE)) |
| 187 self.ApplyPatch(self.Config(TEMPORARY_PATCH_FILE), self._options.revert) | 187 self.ApplyPatch(self.Config(TEMPORARY_PATCH_FILE), self._options.revert) |
| 188 if self._options.patch: | 188 if self._options.patch: |
| 189 self.ApplyPatch(self._options.patch, self._options.revert) | 189 self.ApplyPatch(self._options.patch, self._options.revert) |
| 190 | 190 |
| 191 | 191 |
| 192 class PrepareVersion(Step): | 192 class PrepareVersion(Step): |
| 193 MESSAGE = "Prepare version file." | 193 MESSAGE = "Prepare version file." |
| 194 | 194 |
| 195 def RunStep(self): | 195 def RunStep(self): |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 def Main(): | 354 def Main(): |
| 355 parser = BuildOptions() | 355 parser = BuildOptions() |
| 356 options = parser.parse_args() | 356 options = parser.parse_args() |
| 357 if not ProcessOptions(options): | 357 if not ProcessOptions(options): |
| 358 parser.print_help() | 358 parser.print_help() |
| 359 return 1 | 359 return 1 |
| 360 RunMergeToBranch(CONFIG, MergeToBranchOptions(options)) | 360 RunMergeToBranch(CONFIG, MergeToBranchOptions(options)) |
| 361 | 361 |
| 362 if __name__ == "__main__": | 362 if __name__ == "__main__": |
| 363 sys.exit(Main()) | 363 sys.exit(Main()) |
| OLD | NEW |