hg: don't attempt to extend `sys.path` with the user site without `APPDATA`
This variable is created by the system and *should* be available, but
test-lfs-bundle.t has a test where it is explicitly unset. It wasn't caught
before because prior to 95af358fcdfe, it was limited to the py2exe binary. As a
precaution, fix both that and the pyoxidizer case that was causing the test to
fail.
Differential Revision: https://phab.mercurial-scm.org/D11354
from __future__ import absolute_import, print_function
import sys
from mercurial import (
pycompat,
util,
)
def main(argv):
enc = util.urlreq.quote(pycompat.sysbytes(argv[1]))
if pycompat.iswindows:
fmt = 'file:///%s'
else:
fmt = 'file://%s'
print(fmt % pycompat.sysstr(enc))
if __name__ == '__main__':
main(sys.argv)