--- a/mercurial/demandimport.py Sat Aug 08 19:04:09 2015 -0700
+++ b/mercurial/demandimport.py Sat Aug 08 19:05:28 2015 -0700
@@ -24,8 +24,11 @@
b = __import__(a)
'''
-import os, sys
-from contextlib import contextmanager
+from __future__ import absolute_import
+
+import contextlib
+import os
+import sys
# __builtin__ in Python 2, builtins in Python 3.
try:
@@ -33,6 +36,8 @@
except ImportError:
import builtins
+contextmanager = contextlib.contextmanager
+
_origimport = __import__
nothing = object()