D3875: rebase: use staeobj to check whether interrupted rebase exists
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Mon Jul 2 12:43:19 UTC 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4df9cef86740: rebase: use staeobj to check whether interrupted rebase exists (authored by pulkit, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3875?vs=9397&id=9406
REVISION DETAIL
https://phab.mercurial-scm.org/D3875
AFFECTED FILES
hgext/rebase.py
CHANGE DETAILS
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -250,7 +250,9 @@
state = {}
destmap = {}
- try:
+ if not self.stateobj.exists():
+ cmdutil.wrongtooltocontinue(repo, _('rebase'))
+ else:
f = repo.vfs("rebasestate")
for i, l in enumerate(f.read().splitlines()):
if i == 0:
@@ -290,11 +292,6 @@
else:
state[oldrev] = repo[newrev].rev()
- except IOError as err:
- if err.errno != errno.ENOENT:
- raise
- cmdutil.wrongtooltocontinue(repo, _('rebase'))
-
if data['keepbranches'] is None:
raise error.Abort(_('.hg/rebasestate is incomplete'))
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list