mercurial/policy.py
changeset 36627 418f9ea20c35
parent 36146 29dd37a418aa
child 36675 430fdb717549
equal deleted inserted replaced
36626:6754d0c5e1b5 36627:418f9ea20c35
    41 #
    41 #
    42 # The canonical way to do this is to test platform.python_implementation().
    42 # The canonical way to do this is to test platform.python_implementation().
    43 # But we don't import platform and don't bloat for it here.
    43 # But we don't import platform and don't bloat for it here.
    44 if r'__pypy__' in sys.builtin_module_names:
    44 if r'__pypy__' in sys.builtin_module_names:
    45     policy = b'cffi'
    45     policy = b'cffi'
    46 
       
    47 # Our C extensions aren't yet compatible with Python 3. So use pure Python
       
    48 # on Python 3 for now.
       
    49 if sys.version_info[0] >= 3:
       
    50     policy = b'py'
       
    51 
    46 
    52 # Environment variable can always force settings.
    47 # Environment variable can always force settings.
    53 if sys.version_info[0] >= 3:
    48 if sys.version_info[0] >= 3:
    54     if r'HGMODULEPOLICY' in os.environ:
    49     if r'HGMODULEPOLICY' in os.environ:
    55         policy = os.environ[r'HGMODULEPOLICY'].encode(r'utf-8')
    50         policy = os.environ[r'HGMODULEPOLICY'].encode(r'utf-8')