For the purpose of handling states for various multistep operations like
hg graft,hg histedit,hg bisect et al a new class called statecheck
is created .This will help in having a unified approach towards these commands
and handle them with ease.
The class takes in 5 basic arguments which include the name of the command, the
name of the state file associated with it , clearable flag , allowcommit flag and
stopflag which determines whether the command supports --stop option or not.
It further contains a unified way off returning status and hint messages.
The functions of the class generate these messages based on the name of the
command and stopflag.
Merge has been handles seperately with the help of predicate instead of a
This imports unfinishedstates, checkunfinished(), and clearunfinished()
from cmdutil.py and makes it compatible with the new statecheck class.
This also adds support of the new class state.statecheck
throughout core and extensions. This also removes the
previous method cmdutil.unfinishedstates and its API.
The results are shown in tests.