windows: gracefully handle when the username cannot be determined
This assumes implementation details, but I don't see any other way than to check
the environment variables ourselves (which would miss out on any future
enhancements that Python may make). This was originally reported as
https://foss.heptapod.net/mercurial/tortoisehg/thg/-/issues/5835.
# this file holds the definitions that are used in various bzr tests
TERM=dumb; export TERM
echo '[extensions]' >> $HGRCPATH
echo 'convert = ' >> $HGRCPATH
glog()
{
hg log -G --template '{rev}@{branch} "{desc|firstline}" files+: [{file_adds}], files-: [{file_dels}], files: [{file_mods}]\n' "$@"
}
manifest()
{
echo "% manifest of $2"
hg -R $1 manifest -v -r $2
}