mercurial/policy.py
changeset 32544 2e431fb98c6b
parent 32466 28b773aa3ff2
child 32545 0e8b0b9a7acc
--- a/mercurial/policy.py	Sun May 28 17:36:01 2017 +0900
+++ b/mercurial/policy.py	Sun May 28 15:45:52 2017 +0900
@@ -72,16 +72,16 @@
 
 # keep in sync with "version" in C modules
 _cextversions = {
-    r'base85': 1,
-    r'bdiff': 1,
-    r'diffhelpers': 1,
-    r'mpatch': 1,
-    r'osutil': 1,
-    r'parsers': 1,
+    (r'cext', r'base85'): 1,
+    (r'cext', r'bdiff'): 1,
+    (r'cext', r'diffhelpers'): 1,
+    (r'cext', r'mpatch'): 1,
+    (r'cext', r'osutil'): 1,
+    (r'cext', r'parsers'): 1,
 }
 
 def _checkmod(pkgname, modname, mod):
-    expected = _cextversions.get(modname)
+    expected = _cextversions.get((pkgname, modname))
     actual = getattr(mod, r'version', None)
     if actual != expected:
         raise ImportError(r'cannot import module %s.%s '