| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 import argparse | 6 import argparse |
| 7 import collections | 7 import collections |
| 8 import logging | 8 import logging |
| 9 import os | 9 import os |
| 10 import re | 10 import re |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 libjingle_current = self._GetDepsCommitInfo(deps, LIBJINGLE_PATH) | 295 libjingle_current = self._GetDepsCommitInfo(deps, LIBJINGLE_PATH) |
| 296 | 296 |
| 297 # Find ToT revisions. | 297 # Find ToT revisions. |
| 298 webrtc_latest = self._GetCommitInfo(WEBRTC_PATH) | 298 webrtc_latest = self._GetCommitInfo(WEBRTC_PATH) |
| 299 libjingle_latest = self._GetCommitInfo(LIBJINGLE_PATH) | 299 libjingle_latest = self._GetCommitInfo(LIBJINGLE_PATH) |
| 300 | 300 |
| 301 self._UpdateDep(deps_filename, WEBRTC_PATH, webrtc_latest) | 301 self._UpdateDep(deps_filename, WEBRTC_PATH, webrtc_latest) |
| 302 self._UpdateDep(deps_filename, LIBJINGLE_PATH, libjingle_latest) | 302 self._UpdateDep(deps_filename, LIBJINGLE_PATH, libjingle_latest) |
| 303 | 303 |
| 304 if self._IsTreeClean(): | 304 if self._IsTreeClean(): |
| 305 logging.debug('Tree is clean - no changes detected.') | 305 print 'The latest revision is already rolled for WebRTC and libjingle.' |
| 306 self._DeleteRollBranch() | 306 self._DeleteRollBranch() |
| 307 else: | 307 else: |
| 308 self._UpdateReadmeFile(LIBJINGLE_README, libjingle_latest.commit_position) | 308 self._UpdateReadmeFile(LIBJINGLE_README, libjingle_latest.commit_position) |
| 309 description = _GenerateCLDescription(webrtc_current, libjingle_current, | 309 description = _GenerateCLDescription(webrtc_current, libjingle_current, |
| 310 webrtc_latest, libjingle_latest) | 310 webrtc_latest, libjingle_latest) |
| 311 logging.debug('Committing changes locally.') | 311 logging.debug('Committing changes locally.') |
| 312 self._RunCommand(['git', 'add', '--update', '.']) | 312 self._RunCommand(['git', 'add', '--update', '.']) |
| 313 self._RunCommand(['git', 'commit', '-m', description]) | 313 self._RunCommand(['git', 'commit', '-m', description]) |
| 314 logging.debug('Uploading changes...') | 314 logging.debug('Uploading changes...') |
| 315 self._RunCommand(['git', 'cl', 'upload', '-m', description], | 315 self._RunCommand(['git', 'cl', 'upload', '-m', description], |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 if args.abort: | 426 if args.abort: |
| 427 return autoroller.Abort() | 427 return autoroller.Abort() |
| 428 elif args.wait_for_trybots: | 428 elif args.wait_for_trybots: |
| 429 return autoroller.WaitForTrybots() | 429 return autoroller.WaitForTrybots() |
| 430 else: | 430 else: |
| 431 return autoroller.PrepareRoll(args.dry_run, args.ignore_checks, | 431 return autoroller.PrepareRoll(args.dry_run, args.ignore_checks, |
| 432 args.no_commit, args.close_previous_roll) | 432 args.no_commit, args.close_previous_roll) |
| 433 | 433 |
| 434 if __name__ == '__main__': | 434 if __name__ == '__main__': |
| 435 sys.exit(main()) | 435 sys.exit(main()) |
| OLD | NEW |