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
pager.pager=p0 # $TESTTMP/sysrc:4
ui.editor=e1 # $TESTTMP/userrc:2
pager.pager=p2 # $PAGER
ui.editor=e1 # $TESTTMP/userrc:2