diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -198,7 +198,7 @@ def restorestatus(self): """Restore a previously stored status""" - repo = self.repo + repo = self.repo.unfiltered() keepbranches = None legacydest = None collapse = False diff --git a/tests/test-rebase-obsolete.t b/tests/test-rebase-obsolete.t --- a/tests/test-rebase-obsolete.t +++ b/tests/test-rebase-obsolete.t @@ -1301,3 +1301,48 @@ / o 0:426bada5c675 A +For some reasons (--hidden, rebaseskipobsolete=0, directaccess, etc), +rebasestate may contain hidden hashes. "rebase --abort" should work regardless. + + $ hg init $TESTTMP/hidden-state + $ cd $TESTTMP/hidden-state + + $ hg debugdrawdag <<'EOS' + > C + > | + > D B # prune: B, C + > |/ # B/D=B + > A + > EOS + + $ eval `hg tags -T '{tag}={node}\n'` + $ rm .hg/localtags + + $ hg update -q $C --hidden + $ hg rebase -s $B -d $D --config experimental.rebaseskipobsolete=0 + rebasing 1:2ec65233581b "B" + merging D + warning: conflicts while merging D! (edit, then use 'hg resolve --mark') + unresolved conflicts (see hg resolve, then hg rebase --continue) + [1] + + $ hg log -G + @ 2:b18e25de2cf5 D + | + | @ 1:2ec65233581b B + |/ + o 0:426bada5c675 A + + $ hg summary + parent: 2:b18e25de2cf5 tip + D + parent: 1:2ec65233581b (obsolete) + B + branch: default + commit: 2 modified, 1 unknown, 1 unresolved (merge) + update: (current) + phases: 3 draft + rebase: 0 rebased, 2 remaining (rebase --continue) + + $ hg rebase --abort + rebase aborted