Mercurial > hg
diff hgext/rebase.py @ 38518:cf24f678adda
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
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 01 Jul 2018 01:00:39 +0530 |
parents | 4df9cef86740 |
children | 731debab233f |
line wrap: on
line diff
--- 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: