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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 elif line.startswith("#define BUILD_NUMBER"): | 525 elif line.startswith("#define BUILD_NUMBER"): |
526 line = re.sub("\d+$", self[prefix + "build"], line) | 526 line = re.sub("\d+$", self[prefix + "build"], line) |
527 elif line.startswith("#define PATCH_LEVEL"): | 527 elif line.startswith("#define PATCH_LEVEL"): |
528 line = re.sub("\d+$", self[prefix + "patch"], line) | 528 line = re.sub("\d+$", self[prefix + "patch"], line) |
529 output += "%s\n" % line | 529 output += "%s\n" % line |
530 TextToFile(output, version_file) | 530 TextToFile(output, version_file) |
531 | 531 |
532 def SVNCommit(self, root, commit_message): | 532 def SVNCommit(self, root, commit_message): |
533 patch = self.GitDiff("HEAD^", "HEAD") | 533 patch = self.GitDiff("HEAD^", "HEAD") |
534 TextToFile(patch, self._config[PATCH_FILE]) | 534 TextToFile(patch, self._config[PATCH_FILE]) |
| 535 self.Command("svn", "update", cwd=self._options.svn) |
| 536 if self.Command("svn", "status", cwd=self._options.svn) != "": |
| 537 self.Die("SVN checkout not clean.") |
535 if not self.Command("patch", "-d %s -p1 -i %s" % | 538 if not self.Command("patch", "-d %s -p1 -i %s" % |
536 (root, self._config[PATCH_FILE]), | 539 (root, self._config[PATCH_FILE]), |
537 cwd=self._options.svn): | 540 cwd=self._options.svn): |
538 self.Die("Could not apply patch.") | 541 self.Die("Could not apply patch.") |
539 self.Command( | 542 self.Command( |
540 "svn", | 543 "svn", |
541 "commit --non-interactive --username=%s --config-dir=%s -m \"%s\"" % | 544 "commit --non-interactive --username=%s --config-dir=%s -m \"%s\"" % |
542 (self._options.author, self._options.svn_config, commit_message), | 545 (self._options.author, self._options.svn_config, commit_message), |
543 cwd=self._options.svn) | 546 cwd=self._options.svn) |
544 | 547 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 for (number, step_class) in enumerate(step_classes): | 706 for (number, step_class) in enumerate(step_classes): |
704 steps.append(MakeStep(step_class, number, self._state, self._config, | 707 steps.append(MakeStep(step_class, number, self._state, self._config, |
705 options, self._side_effect_handler)) | 708 options, self._side_effect_handler)) |
706 for step in steps[options.step:]: | 709 for step in steps[options.step:]: |
707 if step.Run(): | 710 if step.Run(): |
708 return 0 | 711 return 0 |
709 return 0 | 712 return 0 |
710 | 713 |
711 def Run(self, args=None): | 714 def Run(self, args=None): |
712 return self.RunSteps(self._Steps(), args) | 715 return self.RunSteps(self._Steps(), args) |
OLD | NEW |