This is a step further toward clarifying the semantic of various dirstate call.
Having a dedicated function comes with a couple of benefits:
- we can move duplicated logic about how to handle the previous state within
the dirstate. Since we are sure this is always called in the same situation, we
can implement that logic once in the dirstate.
- having a dedicated method for this case unlock also having a dedicated
method for the other case and recording more information at that time. All this
leading having more code within the dirstate and higher level API that are less
error prone.
This will also need a b'' prefix, can you follow up for that?