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

Side by Side Diff: tools/safely-roll-webkit.py

Issue 9148045: Making safely-roll-webkit.py work with "new git workflow" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changed copyright header to 2012 as presubmit wants Created 8 years, 11 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 | Annotate | Revision Log
« 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) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Generate a CL to roll webkit to the specified revision number and post 6 """Generate a CL to roll webkit to the specified revision number and post
7 it to Rietveld so that the CL will land automatically if it passes the 7 it to Rietveld so that the CL will land automatically if it passes the
8 commit-queue's checks. 8 commit-queue's checks.
9 """ 9 """
10 10
11 import logging 11 import logging
12 import optparse 12 import optparse
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 print msg 58 print msg
59 59
60 # Silence the editor. 60 # Silence the editor.
61 os.environ['EDITOR'] = 'true' 61 os.environ['EDITOR'] = 'true'
62 62
63 old_branch = scm.GIT.GetBranch(root_dir) 63 old_branch = scm.GIT.GetBranch(root_dir)
64 if old_branch == 'webkit_roll': 64 if old_branch == 'webkit_roll':
65 parser.error( 65 parser.error(
66 'Please delete the branch webkit_roll and move to a different branch') 66 'Please delete the branch webkit_roll and move to a different branch')
67 subprocess2.check_output( 67 subprocess2.check_output(
68 ['git', 'checkout', '-b', 'webkit_roll', 'origin/trunk']) 68 ['git', 'checkout', '-b', 'webkit_roll', 'origin/master'])
69 try: 69 try:
70 process_deps(os.path.join(root_dir, 'DEPS'), new_rev) 70 process_deps(os.path.join(root_dir, 'DEPS'), new_rev)
71 commit_msg = msg + '\n\nTBR=\n' 71 commit_msg = msg + '\n\nTBR=\n'
72 subprocess2.check_output(['git', 'commit', '-m', commit_msg, 'DEPS']) 72 subprocess2.check_output(['git', 'commit', '-m', commit_msg, 'DEPS'])
73 subprocess2.check_call(['git', 'diff', 'origin/trunk']) 73 subprocess2.check_call(['git', 'diff', 'origin/master'])
74 subprocess2.check_call(['git', 'cl', 'upload', '--use-commit-queue']) 74 subprocess2.check_call(['git', 'cl', 'upload', '--use-commit-queue'])
75 finally: 75 finally:
76 subprocess2.check_output(['git', 'checkout', old_branch]) 76 subprocess2.check_output(['git', 'checkout', old_branch])
77 subprocess2.check_output(['git', 'branch', '-D', 'webkit_roll']) 77 subprocess2.check_output(['git', 'branch', '-D', 'webkit_roll'])
78 return 0 78 return 0
79 79
80 80
81 if __name__ == '__main__': 81 if __name__ == '__main__':
82 sys.exit(main()) 82 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