windows: drop some py2 compatibility code
The comment was wrong- the exception handler was the py3 case.
windows: prevent bytes from being passed to registry APIs
There was a TortoiseHg bug report in this area[1], and from inspection, it looks
like passing `b""` as `valname` would fail to convert to unicode. The
underlying API allows both `""` and `NULL` to return the default value for the
key.
[1] https://foss.heptapod.net/mercurial/tortoisehg/thg/-/issues/5803
logcmdutil: use the same data as {file*} template keywords (
issue6642)
Since
0c72eddb4be5 template keywords that show files use a different source of
data than ctx.p1().status(ctx). These two functions in logcmdutil also show
file lists when needed (e.g. log with --debug flag), but previously they used
the old way of just looking at status compared to p1 and it resulted in
differences between e.g. hg log --debug and hg log -T '{file*}'.
test-phases.t needs an adjustment because 7 is a merge commit of two
topological branches and one of them introduces files C, D and E.
tests: show that hg log --debug output differs from {file*} template keywords
hg log --debug -T xml doesn't differ, but let's test it because we can.