rebase: refactor logic to read rebasestate in a separate function...
rebase: refactor logic to read rebasestate in a separate function
This will help us in plugging the use of state.cmdstate() to read rebasestate.
Differential Revision:
https://phab.mercurial-scm.org/D3873