Simplify backward compatible import
For an extension it's not worth the trouble to try for demandload.
--- a/hgkw/keyword.py Fri Mar 30 17:12:38 2007 +0200
+++ b/hgkw/keyword.py Fri Apr 20 00:24:32 2007 +0200
@@ -85,17 +85,10 @@
Header: /path/to/basename,v csetid %Y/%m/%d %H:%M:%S username
'''
-try:
- from mercurial.demandload import * # stable
- from mercurial.i18n import gettext as _
- demandload(globals(), 'mercurial:commands,fancyopts,templater,util')
- demandload(globals(), 'mercurial:cmdutil,context,filelog')
- demandload(globals(), 'os re sys time')
-except ImportError: # demandimport
- from mercurial.i18n import _
- from mercurial import commands, fancyopts, templater, util
- from mercurial import cmdutil, context, filelog
- import os, re, sys, time
+from mercurial.i18n import gettext as _
+from mercurial import commands, fancyopts, templater, util
+from mercurial import cmdutil, context, filelog
+import os, re, sys, time
deftemplates = {
'Revision': '{node|short}',