| OLD | NEW |
| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 current_rev = GetClangRev(current_lines) | 246 current_rev = GetClangRev(current_lines) |
| 247 | 247 |
| 248 new_clang_update_py = ReadRemoteCrFile(CLANG_UPDATE_SCRIPT_URL_PATH, | 248 new_clang_update_py = ReadRemoteCrFile(CLANG_UPDATE_SCRIPT_URL_PATH, |
| 249 new_cr_rev).splitlines() | 249 new_cr_rev).splitlines() |
| 250 new_rev = GetClangRev(new_clang_update_py) | 250 new_rev = GetClangRev(new_clang_update_py) |
| 251 return ChangedDep(CLANG_UPDATE_SCRIPT_LOCAL_PATH, None, current_rev, new_rev) | 251 return ChangedDep(CLANG_UPDATE_SCRIPT_LOCAL_PATH, None, current_rev, new_rev) |
| 252 | 252 |
| 253 | 253 |
| 254 def GenerateCommitMessage(current_cr_rev, new_cr_rev, current_commit_pos, | 254 def GenerateCommitMessage(current_cr_rev, new_cr_rev, current_commit_pos, |
| 255 new_commit_pos, changed_deps_list, clang_change): | 255 new_commit_pos, changed_deps_list, clang_change): |
| 256 current_cr_rev = current_cr_rev[0:7] | 256 current_cr_rev = current_cr_rev[0:10] |
| 257 new_cr_rev = new_cr_rev[0:7] | 257 new_cr_rev = new_cr_rev[0:10] |
| 258 rev_interval = '%s..%s' % (current_cr_rev, new_cr_rev) | 258 rev_interval = '%s..%s' % (current_cr_rev, new_cr_rev) |
| 259 git_number_interval = '%s:%s' % (current_commit_pos, new_commit_pos) | 259 git_number_interval = '%s:%s' % (current_commit_pos, new_commit_pos) |
| 260 | 260 |
| 261 commit_msg = ['Roll chromium_revision %s (%s)\n' % (rev_interval, | 261 commit_msg = ['Roll chromium_revision %s (%s)\n' % (rev_interval, |
| 262 git_number_interval)] | 262 git_number_interval)] |
| 263 commit_msg.append('Change log: %s' % (CHROMIUM_LOG_TEMPLATE % rev_interval)) | 263 commit_msg.append('Change log: %s' % (CHROMIUM_LOG_TEMPLATE % rev_interval)) |
| 264 commit_msg.append('Full diff: %s\n' % (CHROMIUM_COMMIT_TEMPLATE % | 264 commit_msg.append('Full diff: %s\n' % (CHROMIUM_COMMIT_TEMPLATE % |
| 265 rev_interval)) | 265 rev_interval)) |
| 266 # TBR field will be empty unless in some custom cases, where some engineers | 266 # TBR field will be empty unless in some custom cases, where some engineers |
| 267 # are added. | 267 # are added. |
| 268 tbr_authors = '' | 268 tbr_authors = '' |
| 269 if changed_deps_list: | 269 if changed_deps_list: |
| 270 commit_msg.append('Changed dependencies:') | 270 commit_msg.append('Changed dependencies:') |
| 271 | 271 |
| 272 for c in changed_deps_list: | 272 for c in changed_deps_list: |
| 273 commit_msg.append('* %s: %s/+log/%s..%s' % (c.path, c.url, | 273 commit_msg.append('* %s: %s/+log/%s..%s' % (c.path, c.url, |
| 274 c.current_rev[0:7], | 274 c.current_rev[0:10], |
| 275 c.new_rev[0:7])) | 275 c.new_rev[0:10])) |
| 276 if 'libvpx' in c.path: | 276 if 'libvpx' in c.path: |
| 277 tbr_authors += 'marpan@webrtc.org, stefan@webrtc.org, ' | 277 tbr_authors += 'marpan@webrtc.org, stefan@webrtc.org, ' |
| 278 | 278 |
| 279 change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, 'DEPS') | 279 change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, 'DEPS') |
| 280 commit_msg.append('DEPS diff: %s\n' % change_url) | 280 commit_msg.append('DEPS diff: %s\n' % change_url) |
| 281 else: | 281 else: |
| 282 commit_msg.append('No dependencies changed.') | 282 commit_msg.append('No dependencies changed.') |
| 283 | 283 |
| 284 if clang_change.current_rev != clang_change.new_rev: | 284 if clang_change.current_rev != clang_change.new_rev: |
| 285 commit_msg.append('Clang version changed %s:%s' % | 285 commit_msg.append('Clang version changed %s:%s' % |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 _CreateRollBranch(opts.dry_run) | 437 _CreateRollBranch(opts.dry_run) |
| 438 UpdateDeps(deps_filename, current_cr_rev, new_cr_rev) | 438 UpdateDeps(deps_filename, current_cr_rev, new_cr_rev) |
| 439 _LocalCommit(commit_msg, opts.dry_run) | 439 _LocalCommit(commit_msg, opts.dry_run) |
| 440 _UploadCL(opts.dry_run, opts.rietveld_email) | 440 _UploadCL(opts.dry_run, opts.rietveld_email) |
| 441 _SendToCQ(opts.dry_run, opts.skip_cq) | 441 _SendToCQ(opts.dry_run, opts.skip_cq) |
| 442 return 0 | 442 return 0 |
| 443 | 443 |
| 444 | 444 |
| 445 if __name__ == '__main__': | 445 if __name__ == '__main__': |
| 446 sys.exit(main()) | 446 sys.exit(main()) |
| OLD | NEW |