localrepository.status: only acquire wlock if actually needed.
This speeds up the common case of not needing to update the dirstate,
and avoids the need to reload and parse the dirstate "just in case".
error: pretxncommit.nocommits hook failed: no commits allowed
abort: no commits allowed
transaction abort!
rollback completed
error: pretxncommit.nocommits hook failed: no commits allowed
abort: no commits allowed
transaction abort!
rollback completed