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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 % ", ".join(port_revision_list)): | 97 % ", ".join(port_revision_list)): |
98 #: 'y': Add ports to revision list. | 98 #: 'y': Add ports to revision list. |
99 self["full_revision_list"].extend(port_revision_list) | 99 self["full_revision_list"].extend(port_revision_list) |
100 | 100 |
101 | 101 |
102 class CreateCommitMessage(Step): | 102 class CreateCommitMessage(Step): |
103 MESSAGE = "Create commit message." | 103 MESSAGE = "Create commit message." |
104 | 104 |
105 def RunStep(self): | 105 def RunStep(self): |
106 | 106 |
107 # Stringify: ["abcde", "12345"] -> "abcde, 12345" | 107 # Stringify: [123, 234] -> "r123, r234" |
108 self["revision_list"] = ", ".join(self["full_revision_list"])) | 108 self["revision_list"] = ", ".join(map(lambda s: "r%s" % s, |
| 109 self["full_revision_list"])) |
109 | 110 |
110 if not self["revision_list"]: # pragma: no cover | 111 if not self["revision_list"]: # pragma: no cover |
111 self.Die("Revision list is empty.") | 112 self.Die("Revision list is empty.") |
112 | 113 |
113 if self._options.revert and not self._options.revert_master: | 114 if self._options.revert and not self._options.revert_master: |
114 action_text = "Rollback of %s" | 115 action_text = "Rollback of %s" |
115 else: | 116 else: |
116 action_text = "Merged %s" | 117 action_text = "Merged %s" |
117 | 118 |
118 # The commit message title is added below after the version is specified. | 119 # The commit message title is added below after the version is specified. |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 CommitLocal, | 307 CommitLocal, |
307 UploadStep, | 308 UploadStep, |
308 CommitRepository, | 309 CommitRepository, |
309 TagRevision, | 310 TagRevision, |
310 CleanUp, | 311 CleanUp, |
311 ] | 312 ] |
312 | 313 |
313 | 314 |
314 if __name__ == "__main__": # pragma: no cover | 315 if __name__ == "__main__": # pragma: no cover |
315 sys.exit(MergeToBranch().Run()) | 316 sys.exit(MergeToBranch().Run()) |
OLD | NEW |