histedit: factor out logic of processing state data in separate fn
The new function will serve as the point from where we always get a dictionary
of data stored in the statefile and will be helpful in integrating
state.cmdstate.read() to write statefile in cbor.
Differential Revision: https://phab.mercurial-scm.org/D3863
histedit: use hg.updaterepo() to avoid ui.{push|pop}buffer() hack
In some parts of code, we call hg.update() and surround that with
ui.pushbuffer() and ui.popbuffer() to suppress the output returned by
hg.update().
We have hg.updaterepo() which does not writes to UI and can be used instead.
Differential Revision: https://phab.mercurial-scm.org/D3862