1
0
Fork 0

added fallback for applying patch

This commit is contained in:
Christian Kühnel 2019-10-21 22:41:37 +02:00
parent ac61475fe2
commit dddf48b57b

View file

@ -37,7 +37,10 @@ def _get_parent_hash(diff_id: str, phab:Phabricator) -> str:
def _git_checkout(git_hash:str): def _git_checkout(git_hash:str):
try:
subprocess.check_call('git reset --hard {}'.format(git_hash), shell=True) subprocess.check_call('git reset --hard {}'.format(git_hash), shell=True)
except CalledProcessError:
subprocess.check_call('git checkout master')
subprocess.check_call('git clean -fdx', shell=True) subprocess.check_call('git clean -fdx', shell=True)