tests: replace test tmp directory with $TESTTMP in test output
This reduces the number of patterns that must be adjusted when writing tests.
dispatch: properly handle relative path aliases used with -R (
issue2376)
This ensures the repo config is read relative to the repo root during
dispatch.
dispatch: remove superfluous try/except when reading local ui config
ui.readconfig() already handles IOError in this case.
keyword: switch kwtemplater.record in kw_dorecord()
Obsoletes the need for a global recordcommands variable.
keyword: specific regular expressions depending on read mode
More safeguarding against accidental (un)expansion:
Reading filelog: act only on \$(kw1|kw2|..)\$ as keywords are always
stored unexpanded.
Reading wdir: act only on \$(kw1|kw2|..): [^$\n\r]*? \$ as we only
are interested in expanded keywords in this situation.
Note: we cannot use ..): [^$\n\r]+? \$ because e.g.
the {branch} template might be empty.
hg record is a special case as we read from the working directory and
need one regex each for modified and added files. Therefore test
recording an added file.
This way we finally also forbid sequences like $Id: $ being treated
as keywords.