Mercurial > hg
comparison hg @ 29172:2ea9c9aa6e60
hg: limit HGUNICODEPEDANTRY to py2
reload is not available in py3, and py3 is fatal anyway
author | timeless <timeless@mozdev.org> |
---|---|
date | Tue, 05 Apr 2016 01:35:36 +0000 |
parents | 73e4a02e6d23 |
children | 1f5052d35b30 |
comparison
equal
deleted
inserted
replaced
29171:de28dedd1ff1 | 29172:2ea9c9aa6e60 |
---|---|
9 | 9 |
10 import os | 10 import os |
11 import sys | 11 import sys |
12 | 12 |
13 if os.environ.get('HGUNICODEPEDANTRY', False): | 13 if os.environ.get('HGUNICODEPEDANTRY', False): |
14 reload(sys) | 14 try: |
15 sys.setdefaultencoding("undefined") | 15 reload(sys) |
16 | 16 sys.setdefaultencoding("undefined") |
17 except NameError: | |
18 pass | |
17 | 19 |
18 libdir = '@LIBDIR@' | 20 libdir = '@LIBDIR@' |
19 | 21 |
20 if libdir != '@' 'LIBDIR' '@': | 22 if libdir != '@' 'LIBDIR' '@': |
21 if not os.path.isabs(libdir): | 23 if not os.path.isabs(libdir): |