tests/sitecustomize.py
author Kostia Balytskyi <ikostia@fb.com>
Mon, 09 Oct 2017 02:30:23 -0700
changeset 34530 ed5acd3fd7e1
parent 30477 d2c40510104e
child 43076 2372284d9457
permissions -rw-r--r--
windows: add an experimental option for long paths support This commit adds an experimental --long-paths-support flag to build_hgexe on Windows. It is off by default, but when supplied, causes setup.py to embed some XML into the generated hg.exe, which in turn tells Windows to allow this exe to use long paths (given that the appropriate registry setting is enabled as well). This was tested on Windows 10 14393 and 15063. This commit introduces a badly-named initialize_options function, but its name is dictated by distutils, rather than chosen. # no-check-commit

from __future__ import absolute_import
import os

if os.environ.get('COVERAGE_PROCESS_START'):
    try:
        import coverage
        import uuid

        covpath = os.path.join(os.environ['COVERAGE_DIR'],
                               'cov.%s' % uuid.uuid1())
        cov = coverage.coverage(data_file=covpath, auto_data=True)
        cov._warn_no_data = False
        cov._warn_unimported_source = False
        cov.start()
    except ImportError:
        pass