Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: cros_mark_as_stable.py

Issue 3159010: Don't throw an error if not on stabilizing branch and give more information on exit. (Closed) Base URL: http://src.chromium.org/git/crosutils.git
Patch Set: petkov Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 Raises: 120 Raises:
121 OSError: Error occurred while pushing. 121 OSError: Error occurred while pushing.
122 """ 122 """
123 123
124 # TODO(sosa) - Add logic for buildbot to check whether other slaves have 124 # TODO(sosa) - Add logic for buildbot to check whether other slaves have
125 # completed and push this change only if they have. 125 # completed and push this change only if they have.
126 126
127 # Sanity check to make sure we're on a stabilizing branch before pushing. 127 # Sanity check to make sure we're on a stabilizing branch before pushing.
128 if not _CheckOnStabilizingBranch(): 128 if not _CheckOnStabilizingBranch():
129 generate_test_report.Die('Expected %s to be on branch "%s"' % 129 print 'Not on branch %s so no work found to push. Exiting' % \
130 (os.getcwd(), _STABLE_BRANCH_NAME)) 130 _STABLE_BRANCH_NAME
131 return
132
131 description = _RunCommand('git log --format=format:%s%n%n%b ' + 133 description = _RunCommand('git log --format=format:%s%n%n%b ' +
132 gflags.FLAGS.tracking_branch + '..') 134 gflags.FLAGS.tracking_branch + '..')
133 description = 'Marking set of ebuilds as stable\n\n%s' % description 135 description = 'Marking set of ebuilds as stable\n\n%s' % description
134 merge_branch_name = 'merge_branch' 136 merge_branch_name = 'merge_branch'
135 _RunCommand('git remote update') 137 _RunCommand('git remote update')
136 _RunCommand('git checkout -b %s %s' % ( 138 _RunCommand('git checkout -b %s %s' % (
137 merge_branch_name, gflags.FLAGS.tracking_branch)) 139 merge_branch_name, gflags.FLAGS.tracking_branch))
138 try: 140 try:
139 _RunCommand('git merge --squash %s' % _STABLE_BRANCH_NAME) 141 _RunCommand('git merge --squash %s' % _STABLE_BRANCH_NAME)
140 _RunCommand('git commit -m "%s"' % description) 142 _RunCommand('git commit -m "%s"' % description)
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 'and reset the git repo yourself.' % 372 'and reset the git repo yourself.' %
371 (package_list[:index], overlay_directory)) 373 (package_list[:index], overlay_directory))
372 raise e 374 raise e
373 elif command == 'push': 375 elif command == 'push':
374 _PushChange() 376 _PushChange()
375 377
376 378
377 if __name__ == '__main__': 379 if __name__ == '__main__':
378 main(sys.argv) 380 main(sys.argv)
379 381
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698