| 82 | |
| 83 | |
| 84 | def _Commit(chromium_dir, hash_diff, should_upload): |
| 85 | logging.info('Commit...') |
| 86 | desc="""Roll abseil_revision {0} |
| 87 | |
| 88 | Change Log: |
| 89 | https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+log/{0} |
| 90 | Full diff: |
| 91 | https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+/{0} |
| 92 | Bug: None""".format(hash_diff) |
| 93 | |
| 94 | subprocess.check_call(['git', 'add', 'third_party/abseil-cpp'], cwd=chromium_dir) |
| 95 | proc = subprocess.run(['git', 'diff', '--staged', '--quiet', 'third_party/abseil-cpp'], cwd=chromium_dir) |
| 96 | if proc.returncode == 0: |
| 97 | logging.info('Abseil is up-to-date, nothing to commit!') |
| 98 | return |
| 99 | |
| 100 | subprocess.check_call(['git', 'commit', '-m', desc], cwd=chromium_dir) |
| 101 | |
| 102 | if should_upload: |
| 103 | logging.info('Upload...') |
| 104 | subprocess.check_call(['git', 'cl', 'upload', '-m', desc, '--bypass-hooks'], cwd=chromium_dir) |
| 105 | |
| 106 | logging.info("Next step is manual: Fix BUILD.gn files to match BUILD.bazel changes.") |
| 107 | logging.info("After that run generate_def_files.py. ") |
| 108 | |
| 109 | |
| 110 | def _Roll(should_branch, should_pull, should_upload, revision): |