| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """This module uprevs a given package's ebuild to the next revision.""" | 7 """This module uprevs a given package's ebuild to the next revision.""" |
| 8 | 8 |
| 9 | 9 |
| 10 import fileinput | 10 import fileinput |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 # TODO(sosa) - Add logic for buildbot to check whether other slaves have | 126 # TODO(sosa) - Add logic for buildbot to check whether other slaves have |
| 127 # completed and push this change only if they have. | 127 # completed and push this change only if they have. |
| 128 | 128 |
| 129 # Sanity check to make sure we're on a stabilizing branch before pushing. | 129 # Sanity check to make sure we're on a stabilizing branch before pushing. |
| 130 if not _CheckOnStabilizingBranch(): | 130 if not _CheckOnStabilizingBranch(): |
| 131 generate_test_report.Die('Expected %s to be on branch "%s"' % | 131 generate_test_report.Die('Expected %s to be on branch "%s"' % |
| 132 (_CHROMIUMOS_OVERLAYS_DIRECTORY, | 132 (_CHROMIUMOS_OVERLAYS_DIRECTORY, |
| 133 _STABLE_BRANCH_NAME)) | 133 _STABLE_BRANCH_NAME)) |
| 134 _RunCommand('git cl upload --desc_from_logs -m "%s"' % | 134 _RunCommand('git cl upload --desc_from_logs -m "%s"' % |
| 135 'Marking set of ebuilds as stable') | 135 'Marking set of ebuilds as stable') |
| 136 _RunCommand('git remote update') |
| 137 _RunCommand('git rebase origin/master') |
| 136 _RunCommand('git cl push %s' % gflags.FLAGS.push_options) | 138 _RunCommand('git cl push %s' % gflags.FLAGS.push_options) |
| 137 | 139 |
| 138 | 140 |
| 139 def _RunCommand(command): | 141 def _RunCommand(command): |
| 140 """Runs a shell command and returns stdout back to caller.""" | 142 """Runs a shell command and returns stdout back to caller.""" |
| 141 _Print(' + %s' % command) | 143 _Print(' + %s' % command) |
| 142 proc_handle = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True) | 144 proc_handle = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True) |
| 143 return proc_handle.communicate()[0] | 145 return proc_handle.communicate()[0] |
| 144 | 146 |
| 145 | 147 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 'and reset the git repo yourself.' % | 360 'and reset the git repo yourself.' % |
| 359 (package_list[:index], _CHROMIUMOS_OVERLAYS_DIRECTORY)) | 361 (package_list[:index], _CHROMIUMOS_OVERLAYS_DIRECTORY)) |
| 360 raise e | 362 raise e |
| 361 elif command == 'push': | 363 elif command == 'push': |
| 362 _PushChange() | 364 _PushChange() |
| 363 | 365 |
| 364 | 366 |
| 365 if __name__ == '__main__': | 367 if __name__ == '__main__': |
| 366 main(sys.argv) | 368 main(sys.argv) |
| 367 | 369 |
| OLD | NEW |