dirstate: make parents() faster.
This allows localrepository.status() to avoid reading all but the
first 40 bytes of the dirstate in the common case of running "hg
status".
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".
util._matcher: speed up regexp matching.
In
4babaa52badf, Benoit made a change that substantially slows matching
when a big .hgignore file is in play, because it calls into the regexp
matching engine potentially hundreds of times per file to be matched.
I've partly rolled back his change, so that we only call into the matcher
once per file, but preserved the ability to report a meaningful error
message if there's a syntax error in the regexp.
Work around problem where 'del os.environ["FOO"]' doesn't update environment.
test-hook failed since changeset
949516072388 because of this on Solaris 8.
Use python instead of shell printf with \x for test-simplemerge-cmd
Needed e.g. to be compatible with Solaris.