localrepo: switch to mergestate.clean()
See the previous patches for why we're doing this.
strip: switch to mergestate.clean()
See the previous patches for why we're doing this.
mergestate: add a constructor that sets up a clean merge state
Eventually, we'll move the read call out of the constructor. This will:
- avoid unnecessary reads when we're going to nuke the merge state anyway
- avoid raising an exception if there's an unsupported merge record
'clean' seems like a good name for it because I wanted to avoid anything with
the word 'new' in it, and 'reset' is more an action performed on a merge state
than a way to get a new merge state.
Thanks to Martin von Zweigbergk for feedback about naming this.
mergestate: raise structured exception for unsupported merge records
We're going to catch this exception in 'hg summary' to print a better error
message.
This code is pretty untested, so there are no changes to test output. In
upcoming patches we're going to test the output more thoroughly.
error: add a structured exception for unsupported merge records
We're going to use this in summary to print a better error message.
dirstate: back out
502b56a9e897
Superseded by the parent of this commit.
osutil: make statfiles check for interrupts periodically
This is a simpler and faster fix for
issue4878 than the contortions
performed in
502b56a9e897.
osutil: don't leak on statfiles error
Found using the power of the mighty eyeball.
histedit: extracts _isdirtywc function
Checking if working copy is dirty was done in few places, this
patch extracts it in _isdirtywc procedure.
node: add 'nullhex', hex-encoded nullid
We're going to need this for upcoming changes, because the merge state stores
nodes as hex strings.