mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-18 08:43:37 +00:00
Fix revert update.
This commit is contained in:
parent
1630b3ddc1
commit
ef4e10d917
2 changed files with 13 additions and 2 deletions
|
@ -1,4 +1,9 @@
|
|||
### 3.27.1 (2023-02-10 15:25:00 UTC)
|
||||
### 3.27.2 (2023-02-10 19:25:00 UTC)
|
||||
|
||||
* Fix revert update
|
||||
|
||||
|
||||
### 3.27.1 (2023-02-10 15:25:00 UTC)
|
||||
|
||||
* Change display show status in Change show header
|
||||
* Fix TMDB language caching
|
||||
|
|
|
@ -566,8 +566,11 @@ class GitUpdateManager(UpdateManager):
|
|||
'%s/%s' % (sickgear.GIT_REMOTE, self._old_branch)])
|
||||
if 0 != exit_status:
|
||||
return exit_status
|
||||
_, _, exit_status = self._run_git(['reset', '--hard', '"%s"' % self._old_commit_hash])
|
||||
_, _, exit_status = self._run_git(['reset', '--hard', '%s' % self._old_commit_hash])
|
||||
if 0 == exit_status:
|
||||
self.branch = self._old_branch
|
||||
sickgear.BRANCH = self.branch
|
||||
self._cur_commit_hash = self._old_commit_hash
|
||||
self._old_commit_hash = None
|
||||
self._old_branch = None
|
||||
return exit_status
|
||||
|
@ -579,6 +582,9 @@ class GitUpdateManager(UpdateManager):
|
|||
on the call's success.
|
||||
"""
|
||||
|
||||
self._old_branch = self._find_installed_branch()
|
||||
self._old_commit_hash = self._cur_commit_hash
|
||||
|
||||
if self.branch == self._find_installed_branch():
|
||||
if not self._cur_pr_number:
|
||||
_, _, exit_status = self._run_git(['pull', '-f', '%s' % sickgear.GIT_REMOTE, '%s' % self.branch])
|
||||
|
|
Loading…
Reference in a new issue