ignore: remove .hgignore from ignore list if nonexistent
Previously we would always pass the root .hgignore path to the ignore parser.
The parser then had to be aware that the first path was special, and not warn if
it didn't exist.
In preparation for making the ignore file parser more generically usable, let's
make the parse logic not aware of this special case, and instead just not pass
the root .hgignore in if it doesn't exist.
run-tests: replace open-coded .decode()s on paths with a helper (
issue4667)
This also cleans up the mkdtemp code mentioned in the previous patch.
At this point, the remaining callsites of .{en,de)code() are in the
following categories:
Handling escaped lines in .t files
-----------------------------------
It seems eminently reasonable to me for us to declare that .t files
are valid utf-8, and that any escape sequences we see in .t files
should be valid unicode_escape sequences.
Making error text safe for cdata blocks for xml error reports
-------------------------------------------------------------
This is a point where we're already basically screwed, and we're
simply trying to do something "good enough" that the xml output will
be vaguely useful to the user. Punting here seems fine, and we should
probably stick to the same encoding here that we used in the previous
section.