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

Side by Side Diff: cros_mark_as_stable.py

Issue 3034011: Add wrapper script to get list of updates to pass to stablizing script without other changes (Closed) Base URL: ssh://git@chromiumos-git//crosutils.git
Patch Set: Fix CROS_WORKON_COMMIT Created 10 years, 5 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 | « cros_mark_all_as_stable ('k') | 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 for line in fileinput.input(new_ebuild_path, inplace=1): 268 for line in fileinput.input(new_ebuild_path, inplace=1):
269 # Has to be done here to get changes to sys.stdout from fileinput.input. 269 # Has to be done here to get changes to sys.stdout from fileinput.input.
270 if not redirect_file: 270 if not redirect_file:
271 redirect_file = sys.stdout 271 redirect_file = sys.stdout
272 if line.startswith('KEYWORDS'): 272 if line.startswith('KEYWORDS'):
273 # Actually mark this file as stable by removing ~'s. 273 # Actually mark this file as stable by removing ~'s.
274 redirect_file.write(line.replace("~", "")) 274 redirect_file.write(line.replace("~", ""))
275 elif line.startswith('EAPI'): 275 elif line.startswith('EAPI'):
276 # Always add new commit_id after EAPI definition. 276 # Always add new commit_id after EAPI definition.
277 redirect_file.write(line) 277 redirect_file.write(line)
278 redirect_file.write('EGIT_COMMIT="%s"' % commit_id) 278 redirect_file.write('CROS_WORKON_COMMIT="%s"' % commit_id)
279 elif not line.startswith('EGIT_COMMIT'): 279 elif not line.startswith('CROS_WORKON_COMMIT'):
280 # Skip old EGIT_COMMIT definition. 280 # Skip old CROS_WORKON_COMMIT definition.
281 redirect_file.write(line) 281 redirect_file.write(line)
282 fileinput.close() 282 fileinput.close()
283 283
284 _Print('Adding new stable ebuild to git') 284 _Print('Adding new stable ebuild to git')
285 _RunCommand('git add %s' % new_ebuild_path) 285 _RunCommand('git add %s' % new_ebuild_path)
286 286
287 _Print('Removing old ebuild from git') 287 _Print('Removing old ebuild from git')
288 _RunCommand('git rm %s' % self._ebuild.ebuild_path) 288 _RunCommand('git rm %s' % self._ebuild.ebuild_path)
289 289
290 def CommitChange(self, message): 290 def CommitChange(self, message):
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 'and reset the git repo yourself.' % 353 'and reset the git repo yourself.' %
354 (package_list[:index], _CHROMIUMOS_OVERLAYS_DIRECTORY)) 354 (package_list[:index], _CHROMIUMOS_OVERLAYS_DIRECTORY))
355 raise e 355 raise e
356 elif command == 'push': 356 elif command == 'push':
357 _PushChange() 357 _PushChange()
358 358
359 359
360 if __name__ == '__main__': 360 if __name__ == '__main__':
361 main(sys.argv) 361 main(sys.argv)
362 362
OLDNEW
« no previous file with comments | « cros_mark_all_as_stable ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698