Make tests work on Solaris:
- replacement for mktemp
- fall back if shell arithmetic doesn't work
- replacement for 'set -x' (which results look different with some shells)
- "FOO=bar; export FOO" instead of "export FOO=bar"
- don't use 'if ! ...'
\.orig$
\.rej$
~$
\.so$
\.pyc$
\.swp$
^tests/.*\.err$
^build/
^dist/
^doc/.*\.[0-9]$
^MANIFEST$
^\.pc/
^patches/
^mercurial/__version__.py$