1
0
Fork 0

fix fallback to master branch

This commit is contained in:
Mikhail Goncharov 2020-07-24 08:58:51 +02:00
parent 2932ea50e3
commit 57702114b0

View file

@ -167,7 +167,7 @@ class ApplyPatch:
commit = self.repo.commit(base_revision)
except Exception as e:
logging.info('Cannot resolve revision {}: {}, going to use "master" instead.'.format(base_revision, e))
commit = self.repo.heads['master']
commit = self.repo.heads['master'].commit
logging.info(f'creating branch {self.branch_name} at {commit.hexsha}')
new_branch = self.repo.create_head(self.branch_name, commit.hexsha)
self.repo.head.reference = new_branch