(should_branch, should_pull, should_upload, revision)
| 108 | |
| 109 | |
| 110 | def _Roll(should_branch, should_pull, should_upload, revision): |
| 111 | chromium_dir = os.getcwd() |
| 112 | abseil_in_chromium_dir = os.path.join(chromium_dir, 'third_party', 'abseil-cpp') |
| 113 | if should_branch: |
| 114 | branch_name = datetime.today().strftime('rolling-absl-%Y%m%d') |
| 115 | logging.info('Creating branch ' + branch_name + ' for the roll...') |
| 116 | subprocess.check_call(['git', 'new-branch', branch_name], cwd=chromium_dir) |
| 117 | |
| 118 | if should_pull: |
| 119 | _SyncChromium(chromium_dir) |
| 120 | |
| 121 | with tempfile.TemporaryDirectory() as abseil_root: |
| 122 | _PullAbseil(abseil_root, revision) |
| 123 | abseil_dir = os.path.join(abseil_root, 'abseil-cpp') |
| 124 | _UpdateAbseilInChromium(abseil_dir, chromium_dir) |
| 125 | hash_diff = _UpdateChromiumReadme(os.path.join(abseil_in_chromium_dir, 'README.chromium'), |
| 126 | abseil_dir) |
| 127 | |
| 128 | _PatchAbseil(abseil_in_chromium_dir) |
| 129 | _Commit(chromium_dir, hash_diff, should_upload) |
| 130 | |
| 131 | |
| 132 | if __name__ == '__main__': |
no test coverage detected