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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 214 |
215 | 215 |
216 class CommitRepository(Step): | 216 class CommitRepository(Step): |
217 def __init__(self): | 217 def __init__(self): |
218 Step.__init__(self, "Commit to the repository.") | 218 Step.__init__(self, "Commit to the repository.") |
219 | 219 |
220 def RunStep(self): | 220 def RunStep(self): |
221 self.WaitForLGTM() | 221 self.WaitForLGTM() |
222 # Re-read the ChangeLog entry (to pick up possible changes). | 222 # Re-read the ChangeLog entry (to pick up possible changes). |
223 # FIXME(machenbach): This was hanging once with a broken pipe. | 223 # FIXME(machenbach): This was hanging once with a broken pipe. |
224 TextToFile(Command("cat %s | awk --posix '{\ | 224 TextToFile(GetLastChangeLogEntries(self.Config(CHANGELOG_FILE)), |
225 if ($0 ~ /^[0-9]{4}-[0-9]{2}-[0-9]{2}:/) {\ | 225 self.Config(CHANGELOG_ENTRY_FILE)) |
226 if (in_firstblock == 1) {\ | |
227 exit 0;\ | |
228 } else {\ | |
229 in_firstblock = 1;\ | |
230 }\ | |
231 };\ | |
232 print $0;\ | |
233 }'" % self.Config(CHANGELOG_FILE)), self.Config(CHANGELOG_ENTRY_FILE)) | |
234 | 226 |
235 if self.Git("cl dcommit", "PRESUBMIT_TREE_CHECK=\"skip\"") is None: | 227 if self.Git("cl dcommit -v", "PRESUBMIT_TREE_CHECK=\"skip\"") is None: |
236 self.Die("'git cl dcommit' failed, please try again.") | 228 self.Die("'git cl dcommit' failed, please try again.") |
237 | 229 |
238 | 230 |
239 class StragglerCommits(Step): | 231 class StragglerCommits(Step): |
240 def __init__(self): | 232 def __init__(self): |
241 Step.__init__(self, "Fetch straggler commits that sneaked in since this " | 233 Step.__init__(self, "Fetch straggler commits that sneaked in since this " |
242 "script was started.") | 234 "script was started.") |
243 | 235 |
244 def RunStep(self): | 236 def RunStep(self): |
245 if self.Git("svn fetch") is None: | 237 if self.Git("svn fetch") is None: |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 def Main(): | 575 def Main(): |
584 parser = BuildOptions() | 576 parser = BuildOptions() |
585 (options, args) = parser.parse_args() | 577 (options, args) = parser.parse_args() |
586 if not ProcessOptions(options): | 578 if not ProcessOptions(options): |
587 parser.print_help() | 579 parser.print_help() |
588 return 1 | 580 return 1 |
589 RunScript(CONFIG, options) | 581 RunScript(CONFIG, options) |
590 | 582 |
591 if __name__ == "__main__": | 583 if __name__ == "__main__": |
592 sys.exit(Main()) | 584 sys.exit(Main()) |
OLD | NEW |