| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 # Add a commit message title. | 191 # Add a commit message title. |
| 192 if self._options.revert: | 192 if self._options.revert: |
| 193 if not self._options.revert_bleeding_edge: | 193 if not self._options.revert_bleeding_edge: |
| 194 title = ("Version %s (rollback of %s)" | 194 title = ("Version %s (rollback of %s)" |
| 195 % (self["version"], self["revision_list"])) | 195 % (self["version"], self["revision_list"])) |
| 196 else: | 196 else: |
| 197 title = "Revert %s." % self["revision_list"] | 197 title = "Revert %s." % self["revision_list"] |
| 198 else: | 198 else: |
| 199 title = ("Version %s (merged %s)" | 199 title = ("Version %s (merged %s)" |
| 200 % (self["version"], self["revision_list"])) | 200 % (self["version"], self["revision_list"])) |
| 201 self["commit_title"] = title |
| 201 self["new_commit_msg"] = "%s\n\n%s" % (title, self["new_commit_msg"]) | 202 self["new_commit_msg"] = "%s\n\n%s" % (title, self["new_commit_msg"]) |
| 202 TextToFile(self["new_commit_msg"], self.Config("COMMITMSG_FILE")) | 203 TextToFile(self["new_commit_msg"], self.Config("COMMITMSG_FILE")) |
| 203 self.GitCommit(file_name=self.Config("COMMITMSG_FILE")) | 204 self.GitCommit(file_name=self.Config("COMMITMSG_FILE")) |
| 204 | 205 |
| 205 | 206 |
| 206 class CommitRepository(Step): | 207 class CommitRepository(Step): |
| 207 MESSAGE = "Commit to the repository." | 208 MESSAGE = "Commit to the repository." |
| 208 | 209 |
| 209 def RunStep(self): | 210 def RunStep(self): |
| 210 self.GitCheckout(self.Config("BRANCHNAME")) | 211 self.GitCheckout(self.Config("BRANCHNAME")) |
| 211 self.WaitForLGTM() | 212 self.WaitForLGTM() |
| 212 self.GitPresubmit() | 213 self.GitPresubmit() |
| 213 self.vc.CLLand() | 214 self.vc.CLLand() |
| 214 | 215 |
| 215 | 216 |
| 216 class TagRevision(Step): | 217 class TagRevision(Step): |
| 217 MESSAGE = "Create the tag." | 218 MESSAGE = "Create the tag." |
| 218 | 219 |
| 219 def RunStep(self): | 220 def RunStep(self): |
| 220 if self._options.revert_bleeding_edge: | 221 if self._options.revert_bleeding_edge: |
| 221 return | 222 return |
| 222 print "Creating tag svn/tags/%s" % self["version"] | 223 print "Creating tag %s" % self["version"] |
| 223 self.vc.Tag(self["version"], self.vc.RemoteBranch(self["merge_to_branch"])) | 224 self.vc.Tag(self["version"], |
| 225 self.vc.RemoteBranch(self["merge_to_branch"]), |
| 226 self["commit_title"]) |
| 224 | 227 |
| 225 | 228 |
| 226 class CleanUp(Step): | 229 class CleanUp(Step): |
| 227 MESSAGE = "Cleanup." | 230 MESSAGE = "Cleanup." |
| 228 | 231 |
| 229 def RunStep(self): | 232 def RunStep(self): |
| 230 self.CommonCleanup() | 233 self.CommonCleanup() |
| 231 if not self._options.revert_bleeding_edge: | 234 if not self._options.revert_bleeding_edge: |
| 232 print "*** SUMMARY ***" | 235 print "*** SUMMARY ***" |
| 233 print "version: %s" % self["version"] | 236 print "version: %s" % self["version"] |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 CommitLocal, | 299 CommitLocal, |
| 297 UploadStep, | 300 UploadStep, |
| 298 CommitRepository, | 301 CommitRepository, |
| 299 TagRevision, | 302 TagRevision, |
| 300 CleanUp, | 303 CleanUp, |
| 301 ] | 304 ] |
| 302 | 305 |
| 303 | 306 |
| 304 if __name__ == "__main__": # pragma: no cover | 307 if __name__ == "__main__": # pragma: no cover |
| 305 sys.exit(MergeToBranch().Run()) | 308 sys.exit(MergeToBranch().Run()) |
| OLD | NEW |