[PATCH 04 of 10] hg: disable demandimport for py3

timeless timeless at fmr.im
Wed May 11 21:23:12 EDT 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1463009081 0
#      Wed May 11 23:24:41 2016 +0000
# Node ID 6a4c3eb0da5d63a0394bf68abe0b5d49c40ab96d
# Parent  5392b4af13e14ca77b24e94f7d390d89384b0ef5
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r 6a4c3eb0da5d
hg: disable demandimport for py3

diff -r 5392b4af13e1 -r 6a4c3eb0da5d hg
--- a/hg	Tue Apr 19 03:09:33 2016 +0000
+++ b/hg	Wed May 11 23:24:41 2016 +0000
@@ -26,9 +26,9 @@
 
 # enable importing on demand to reduce startup time
 try:
-    from mercurial import demandimport; demandimport.enable()
+    if sys.version_info[0] < 3:
+        from mercurial import demandimport; demandimport.enable()
 except ImportError:
-    import sys
     sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" %
                      ' '.join(sys.path))
     sys.stderr.write("(check your install and PYTHONPATH)\n")


More information about the Mercurial-devel mailing list