rebase: check whether the rebasestate exists or not a bit early
Converted the else part into `if True` because that part will soon be under a
except part.
Differential Revision: https://phab.mercurial-scm.org/D3876
--- a/hgext/rebase.py Sun Jul 01 00:52:25 2018 +0530
+++ b/hgext/rebase.py Sun Jul 01 01:00:39 2018 +0530
@@ -227,6 +227,9 @@
def restorestatus(self):
"""Restore a previously stored status"""
+ if not self.stateobj.exists():
+ cmdutil.wrongtooltocontinue(self.repo, _('rebase'))
+
data = self._read()
self.repo.ui.debug('rebase status resumed\n')
@@ -250,9 +253,7 @@
state = {}
destmap = {}
- if not self.stateobj.exists():
- cmdutil.wrongtooltocontinue(repo, _('rebase'))
- else:
+ if True:
f = repo.vfs("rebasestate")
for i, l in enumerate(f.read().splitlines()):
if i == 0: