(self, *, branch, hash=None)
| 144 | self.checkout(branch=self.init_branch, hash=self.init_hash) |
| 145 | |
| 146 | def checkout(self, *, branch, hash=None): |
| 147 | branch_hash_name = get_branch_hash_name(branch=branch, hash=hash) |
| 148 | LOG.info(f'Do checkout to: {branch_hash_name}') |
| 149 | repo = Repo(self.omim_path) |
| 150 | repo.remote('origin').fetch() |
| 151 | repo.git.checkout(branch) |
| 152 | if hash: |
| 153 | repo.git.reset('--hard', hash) |
| 154 | else: |
| 155 | hash = repo.head.object.hexsha |
| 156 | |
| 157 | LOG.info(f'Checkout to: {branch} {hash} done') |
| 158 | |
| 159 | self.branch = branch |
| 160 | self.hash = hash |
| 161 | |
| 162 | def build(self, *, aim, binary_cache_suffix=None, cmake_options=""): |
| 163 | os.chdir(self.build_dir) |
no test coverage detected