added fallback for applying patch
This commit is contained in:
parent
ac61475fe2
commit
dddf48b57b
1 changed files with 4 additions and 1 deletions
|
@ -37,7 +37,10 @@ def _get_parent_hash(diff_id: str, phab:Phabricator) -> str:
|
|||
|
||||
|
||||
def _git_checkout(git_hash:str):
|
||||
try:
|
||||
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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue