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

Side by Side Diff: tools/autoroller/roll_chromium_revision.py

Issue 1173523003: Auto-roll script: Add dirty tree check and git pull (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 """Script to roll chromium_revision in the WebRTC DEPS file.""" 10 """Script to roll chromium_revision in the WebRTC DEPS file."""
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 291
292 292
293 def _CreateRollBranch(dry_run): 293 def _CreateRollBranch(dry_run):
294 current_branch = _RunCommand( 294 current_branch = _RunCommand(
295 ['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0] 295 ['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0]
296 if current_branch != 'master': 296 if current_branch != 'master':
297 logging.error('Please checkout the master branch and re-run this script.') 297 logging.error('Please checkout the master branch and re-run this script.')
298 if not dry_run: 298 if not dry_run:
299 sys.exit(-1) 299 sys.exit(-1)
300 300
301 logging.info('Updating master branch...')
302 _RunCommand(['git', 'pull'])
pbos-webrtc 2015/06/09 09:34:31 Do you want to do this under a dry run? Also is th
kjellander_webrtc 2015/06/09 10:51:04 I thought it shouldn't never hurt your checkout to
301 logging.info('Creating roll branch: %s', ROLL_BRANCH_NAME) 303 logging.info('Creating roll branch: %s', ROLL_BRANCH_NAME)
302 if not dry_run: 304 if not dry_run:
303 _RunCommand(['git', 'checkout', '-b', ROLL_BRANCH_NAME]) 305 _RunCommand(['git', 'checkout', '-b', ROLL_BRANCH_NAME])
304 306
305 307
306 def _RemovePreviousRollBranch(dry_run): 308 def _RemovePreviousRollBranch(dry_run):
307 active_branch, branches = _GetBranches() 309 active_branch, branches = _GetBranches()
308 if active_branch == ROLL_BRANCH_NAME: 310 if active_branch == ROLL_BRANCH_NAME:
309 active_branch = 'master' 311 active_branch = 'master'
310 if ROLL_BRANCH_NAME in branches: 312 if ROLL_BRANCH_NAME in branches:
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 _CreateRollBranch(opts.dry_run) 384 _CreateRollBranch(opts.dry_run)
383 UpdateDeps(deps_filename, current_cr_rev, opts.revision) 385 UpdateDeps(deps_filename, current_cr_rev, opts.revision)
384 _LocalCommit(commit_msg, opts.dry_run) 386 _LocalCommit(commit_msg, opts.dry_run)
385 _UploadCL(opts.dry_run) 387 _UploadCL(opts.dry_run)
386 _LaunchTrybots(opts.dry_run) 388 _LaunchTrybots(opts.dry_run)
387 return 0 389 return 0
388 390
389 391
390 if __name__ == '__main__': 392 if __name__ == '__main__':
391 sys.exit(main()) 393 sys.exit(main())
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