From patchwork Wed May 11 05:20:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1,of,7] hg: limit HGUNICODEPEDANTRY to py2 From: timeless X-Patchwork-Id: 14992 Message-Id: <3f54a96b83308821064b.1462944023@gcc2-power8.osuosl.org> To: mercurial-devel@mercurial-scm.org Date: Wed, 11 May 2016 05:20:23 +0000 # HG changeset patch # User timeless # Date 1459820136 0 # Tue Apr 05 01:35:36 2016 +0000 # Node ID 3f54a96b83308821064b1426c6bf347123ea9e59 # Parent c5dfd864d81f5d1f435ff376ea44b3ea82b12575 # EXP-Topic runtests # Available At bb://timeless/mercurial-crew # hg pull bb://timeless/mercurial-crew -r 3f54a96b8330 hg: limit HGUNICODEPEDANTRY to py2 reload is not available in py3, and py3 is fatal anyway diff -r c5dfd864d81f -r 3f54a96b8330 hg --- a/hg Wed May 11 01:46:11 2016 +0000 +++ b/hg Tue Apr 05 01:35:36 2016 +0000 @@ -11,9 +11,11 @@ import sys if os.environ.get('HGUNICODEPEDANTRY', False): - reload(sys) - sys.setdefaultencoding("undefined") - + try: + reload(sys) + sys.setdefaultencoding("undefined") + except NameError: + pass libdir = '@LIBDIR@'