tests: use 'do sleep 0' instead of 'do true', also on first line of command
f64b25f147d7 established that '... do true ...' shouldn't be used, but that was
only enforced on continued lines.
check-code: put grouping around regexps generated from testpats
This removes the pitfall that would make the testpath r'a|b' match 'b' on all
lines in .t tests.
tests: don't use /dev/urandom for largefiles testing
There is no need to use entropy here just to create some content that only will
be used for hashing and ignored.
This avoids a problem where dd from /dev/urandom on solaris generates too short
output.
encoding: protect against non-ascii default encoding
If the default python encoding was changed from ascii, the attempt to
encode as ascii before lower() could throw a UnicodeEncodeError.
Catch UnicodeError instead to prevent an unhandled exception.
update: fix case-collision with a clean wd and no --clean
cbf2ea2f5ca1 introduced some logic to avoid case-collision detection between
source and destination revisions when it does not make sense: clean or to be
cleaned working directories. Unfortunately, part of it was flawed and the
related test was broken by another bug.
This patch disables cross revision case collision detection for updates without
option or with --check, if the working directory is clean.
update: make --check abort with dirty subrepos
Aka "we could use dirty() but... yeah let's use it"
check-code: 'printf \0' is apparently fine - accept it in check-code
Nobody complained over '\0' in test-eol.t.
The too strict check becomes a problem when this check is applied to more
lines.
tests: ^ must be quoted when used on solaris sh
The check was broken when it was introduced in
6e4cf8319f54.
tests: remove test-pull-pull-corruption2.t
This test gave random failures on slow machines (solaris).
The test was added in
6f6e210b38cf as a test case from
issue148. It did however
require manual setup:
The attached script creates such a corruption (you have to add a "import time;
time.spleep(3)" in localrepo.addchangegroup before the changegroup manifest are
written for example.
The test as it is has thus no value as automatic test case.
The necessary sleep could be added by a hook, but test-pending.t already tests
that.
tests: remove race in test-pull-pull-corruption.t
The output from the background process was not always interleaved "correctly"
with output from the foreground process.