automv: lock the repository before searching for renames
I detected this while debugging something else.
dirstate: distinct transaction callback from largefile
This has not caused any issue so far because the large-files dirstate bypass the
transaction logic. We might want to change that.
In anyway, let us disarm this bug nest before it actually explode.
dirstate: track that changes are pending in a transaction
Nothing is currently broken because if this, but this make the
`_invalidated_context` attribute more accurate.
Being more accurate here will help us later, when dealing with `status` call.
dirstate: add small asserts for double security
We don't need this, but it does not hurt.
dirstate: simplify the invalidation management on context exit
Since the `invalidate` call will directly reset the `_invalidated_context` attribut, we can simplify the code.
In the same go, we move most of the logic out of the `finally` clause. It seems
cleaner and safer. If we are handling an exception, we don't need the `write`
code anyway.
dirstate: use the new `check_invalidated` decorator for `_changing`
W
eeeEEeee, less code.
dirstate: introduce a check_invalidated decorator
This is a common need, so let us consolidate it to simplify the code.