# HG changeset patch # User Christian Ebert # Date 1177021472 -7200 # Node ID 28fd5b5eb3adac170b1c38712aa35e02dd6ab8be # Parent 900a9e4d7f82f3e077573838ea3e81461fbfcf1a Simplify backward compatible import For an extension it's not worth the trouble to try for demandload. diff -r 900a9e4d7f82 -r 28fd5b5eb3ad hgkw/keyword.py --- 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}',