Mercurial > hg
comparison mercurial/tags.py @ 46093:224af78021de
windows: continue looking at `%HOME%` for user config files with py3.8+
The `%HOME%` variable is explicitly called out in `hg help config` as a location
that is consulted when reading user files, but python stopped looking at it
when expanding '~' in py3.8+.[1] Restore that old functionality by copying in
the old implementation (and simplifying it to just use bytes). It could be
simplfied further, since only '~' is passed, but I'm not sure yet if we need to
make this a generic utility function on Windows. There are other uses of
`os.path.expanduser()`, but this is the only case I know of that documents
`%HOME%` usage.
(The reason for removing it was that it typically isn't set, but it actually is
set in MSYS and PowerShell, and `%HOME%` and `%USERPROFILE%` are different in
MSYS. I could be convinced to just replace all uses with this as a general
utility, so we don't have to think too hard about BC.)
[1] https://bugs.python.org/issue36264
Differential Revision: https://phab.mercurial-scm.org/D9559
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 09 Dec 2020 18:21:16 -0500 |
parents | 89a2afe31e82 |
children | 5aac1a1a5beb |
comparison
equal
deleted
inserted
replaced
46092:08fd76a553c9 | 46093:224af78021de |
---|