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

Side by Side Diff: experimental/benchtools/rebase.py

Issue 296943004: bench rebase tools: format commit message and title. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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 | « experimental/benchtools/greenify.py ('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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2014 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 6
7 """rebase.py: standalone script to batch update bench expectations. 7 """rebase.py: standalone script to batch update bench expectations.
8 8
9 Requires gsutil to access gs://chromium-skia-gm and Rietveld credentials. 9 Requires gsutil to access gs://chromium-skia-gm and Rietveld credentials.
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 os.chdir(repo_dir) 119 os.chdir(repo_dir)
120 if subprocess.call(['git', 'clone', '-q', '--depth=50', '--single-branch', 120 if subprocess.call(['git', 'clone', '-q', '--depth=50', '--single-branch',
121 'https://skia.googlesource.com/skia.git', '.']): 121 'https://skia.googlesource.com/skia.git', '.']):
122 status = False 122 status = False
123 subprocess.call(['git', 'checkout', 'master']) 123 subprocess.call(['git', 'checkout', 'master'])
124 subprocess.call(['git', 'pull']) 124 subprocess.call(['git', 'pull'])
125 os.chdir(old_cwd) 125 os.chdir(old_cwd)
126 return status 126 return status
127 127
128 def git_commit_expectations(repo_dir, exp_dir, update_li, h, commit): 128 def git_commit_expectations(repo_dir, exp_dir, update_li, h, commit):
129 commit_msg = """bench rebase after %s 129 commit_msg = """manual bench rebase after %s
130 130
131 TBR=robertphillips@google.com 131 TBR=robertphillips@google.com
132 132
133 Bypassing trybots: 133 Bypassing trybots:
134 NOTRY=true""" % h 134 NOTRY=true""" % h
135 old_cwd = os.getcwd() 135 old_cwd = os.getcwd()
136 os.chdir(repo_dir) 136 os.chdir(repo_dir)
137 upload = ['git', 'cl', 'upload', '-f', '--bypass-hooks', 137 upload = ['git', 'cl', 'upload', '-f', '--bypass-hooks',
138 '--bypass-watchlists', '-m', commit_msg] 138 '--bypass-watchlists', '-m', commit_msg]
139 branch = exp_dir.split('/')[-1] 139 branch = exp_dir.split('/')[-1]
140 if commit: 140 if commit:
141 upload.append('--use-commit-queue') 141 upload.append('--use-commit-queue')
142 cmds = ([['git', 'checkout', 'master'], 142 cmds = ([['git', 'checkout', 'master'],
143 ['git', 'pull'], 143 ['git', 'pull'],
144 ['git', 'checkout', '-b', branch, '-t', 'origin/master']] + 144 ['git', 'checkout', '-b', branch, '-t', 'origin/master']] +
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 print 'ERROR uploading expectations using git.' 239 print 'ERROR uploading expectations using git.'
240 elif not commit: 240 elif not commit:
241 print 'CL created. Please take a look at the link above.' 241 print 'CL created. Please take a look at the link above.'
242 else: 242 else:
243 print 'New bench baselines should be in CQ now.' 243 print 'New bench baselines should be in CQ now.'
244 delete_dirs([gs_dir, exp_dir]) 244 delete_dirs([gs_dir, exp_dir])
245 245
246 246
247 if __name__ == "__main__": 247 if __name__ == "__main__":
248 main() 248 main()
OLDNEW
« no previous file with comments | « experimental/benchtools/greenify.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698