OLD | NEW |
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 Loading... |
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()) |
OLD | NEW |