# HG changeset patch # User Matt Mackall # Date 2006-12-15 02:25:19 # Node ID 6b4127c7d52a103f574945b1197bbe5c786d2580 # Parent 2eec996f2fb99d5948badaf9bcf2ac9f5394daac Simplify i18n imports diff --git a/hgext/acl.py b/hgext/acl.py --- a/hgext/acl.py +++ b/hgext/acl.py @@ -45,7 +45,7 @@ # glob pattern = user4, user5 # ** = user6 -from mercurial.i18n import gettext as _ +from mercurial.i18n import _ from mercurial.node import * from mercurial import util import getpass diff --git a/hgext/bugzilla.py b/hgext/bugzilla.py --- a/hgext/bugzilla.py +++ b/hgext/bugzilla.py @@ -52,7 +52,7 @@ # [usermap] # committer_email = bugzilla_user_name -from mercurial.i18n import gettext as _ +from mercurial.i18n import _ from mercurial.node import * from mercurial import cmdutil, templater, util import os, re, time diff --git a/hgext/extdiff.py b/hgext/extdiff.py --- a/hgext/extdiff.py +++ b/hgext/extdiff.py @@ -48,7 +48,7 @@ # needed files, so running the external diff program will actually be # pretty fast (at least faster than having to compare the entire tree). -from mercurial.i18n import gettext as _ +from mercurial.i18n import _ from mercurial.node import * from mercurial import cmdutil, util import os, shutil, tempfile diff --git a/hgext/fetch.py b/hgext/fetch.py --- a/hgext/fetch.py +++ b/hgext/fetch.py @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from mercurial.i18n import gettext as _ +from mercurial.i18n import _ from mercurial.node import * from mercurial import commands, hg, node, util diff --git a/hgext/gpg.py b/hgext/gpg.py --- a/hgext/gpg.py +++ b/hgext/gpg.py @@ -8,7 +8,7 @@ import os, tempfile, binascii from mercurial import util from mercurial import node as hgnode -from mercurial.i18n import gettext as _ +from mercurial.i18n import _ class gpg: def __init__(self, path, key=None): diff --git a/hgext/hbisect.py b/hgext/hbisect.py --- a/hgext/hbisect.py +++ b/hgext/hbisect.py @@ -6,7 +6,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from mercurial.i18n import gettext as _ +from mercurial.i18n import _ from mercurial import hg, util, commands, cmdutil import os, sys, sets diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -29,7 +29,7 @@ remove patch from applied stack refresh contents of top applied patch qrefresh ''' -from mercurial.i18n import gettext as _ +from mercurial.i18n import _ from mercurial import commands, cmdutil, hg, patch, revlog, util, changegroup import os, sys, re, struct, traceback, errno, bz2 diff --git a/hgext/notify.py b/hgext/notify.py --- a/hgext/notify.py +++ b/hgext/notify.py @@ -65,7 +65,7 @@ # if you like, you can put notify config file in repo that users can # push changes to, they can manage their own subscriptions. -from mercurial.i18n import gettext as _ +from mercurial.i18n import _ from mercurial.node import * from mercurial import patch, cmdutil, templater, util, mail import email.Parser, fnmatch, socket, time diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -66,7 +66,7 @@ import os, errno, popen2, socket, sys, tempfile, time import email.MIMEMultipart, email.MIMEText, email.Utils from mercurial import cmdutil, commands, hg, mail, ui, patch -from mercurial.i18n import gettext as _ +from mercurial.i18n import _ from mercurial.node import * try: diff --git a/hgext/transplant.py b/hgext/transplant.py --- a/hgext/transplant.py +++ b/hgext/transplant.py @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from mercurial.i18n import gettext as _ +from mercurial.i18n import _ import os, tempfile from mercurial import bundlerepo, cmdutil, commands, hg, merge, patch, revlog from mercurial import util diff --git a/mercurial/archival.py b/mercurial/archival.py --- a/mercurial/archival.py +++ b/mercurial/archival.py @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of # the GNU General Public License, incorporated herein by reference. -from i18n import gettext as _ +from i18n import _ from node import * import cStringIO, os, stat, tarfile, time, util, zipfile diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -11,7 +11,7 @@ of the GNU General Public License, incor """ from node import * -from i18n import gettext as _ +from i18n import _ import changegroup, util, os, struct, bz2, tempfile import localrepo, changelog, manifest, filelog, revlog diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -7,7 +7,7 @@ This software may be used and distribute of the GNU General Public License, incorporated herein by reference. """ -from i18n import gettext as _ +from i18n import _ import struct, os, bz2, zlib, util, tempfile def getchunk(source): diff --git a/mercurial/changelog.py b/mercurial/changelog.py --- a/mercurial/changelog.py +++ b/mercurial/changelog.py @@ -6,7 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. from revlog import * -from i18n import gettext as _ +from i18n import _ import os, time, util def _string_escape(text): diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -6,7 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. from node import * -from i18n import gettext as _ +from i18n import _ import os, sys, mdiff, util, templater, patch revrangesep = ':' diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -7,7 +7,7 @@ import demandimport; demandimport.enable() from node import * -from i18n import gettext as _ +from i18n import _ import bisect, os, re, sys, signal, imp, urllib, pdb, shlex, stat import fancyopts, ui, hg, util, lock, revlog, bundlerepo import difflib, patch, time, help, mdiff, tempfile diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -6,7 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. from node import * -from i18n import gettext as _ +from i18n import _ import ancestor, bdiff, repo, revlog, util, os class changectx(object): diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -8,7 +8,7 @@ of the GNU General Public License, incor """ from node import * -from i18n import gettext as _ +from i18n import _ import struct, os, time, bisect, stat, strutil, util, re, errno class dirstate(object): diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -8,7 +8,7 @@ from node import * from repo import * -from i18n import gettext as _ +from i18n import _ import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo import errno, lock, os, shutil, util import merge as _merge diff --git a/mercurial/httprepo.py b/mercurial/httprepo.py --- a/mercurial/httprepo.py +++ b/mercurial/httprepo.py @@ -8,7 +8,7 @@ from node import * from remoterepo import * -from i18n import gettext as _ +from i18n import _ import hg, os, urllib, urllib2, urlparse, zlib, util, httplib import errno, keepalive, tempfile, socket, changegroup diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -6,7 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. from node import * -from i18n import gettext as _ +from i18n import _ import repo, appendfile, changegroup import changelog, dirstate, filelog, manifest, context import re, lock, transaction, tempfile, stat, mdiff, errno, ui diff --git a/mercurial/mail.py b/mercurial/mail.py --- a/mercurial/mail.py +++ b/mercurial/mail.py @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from i18n import gettext as _ +from i18n import _ import os, re, smtplib, templater, util def _smtp(ui): diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -6,7 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. from revlog import * -from i18n import gettext as _ +from i18n import _ import array, bisect, struct, mdiff class manifestdict(dict): diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -6,7 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. from node import * -from i18n import gettext as _ +from i18n import _ import errno, util, os, tempfile def filemerge(repo, fw, fo, wctx, mctx): diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from i18n import gettext as _ +from i18n import _ from node import * import base85, cmdutil, mdiff, util import cStringIO, email.Parser, errno, os, popen2, re, shutil, sha diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -11,7 +11,7 @@ of the GNU General Public License, incor """ from node import * -from i18n import gettext as _ +from i18n import _ import binascii, changegroup, errno, ancestor, mdiff, os import sha, struct, util, zlib diff --git a/mercurial/sshrepo.py b/mercurial/sshrepo.py --- a/mercurial/sshrepo.py +++ b/mercurial/sshrepo.py @@ -7,7 +7,7 @@ from node import * from remoterepo import * -from i18n import gettext as _ +from i18n import _ import hg, os, re, stat, util class sshrepository(remoterepository): diff --git a/mercurial/sshserver.py b/mercurial/sshserver.py --- a/mercurial/sshserver.py +++ b/mercurial/sshserver.py @@ -6,7 +6,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from i18n import gettext as _ +from i18n import _ from node import * import os, streamclone, sys, tempfile, util diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py +++ b/mercurial/statichttprepo.py @@ -7,7 +7,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from i18n import gettext as _ +from i18n import _ import changelog, filelog, httprangereader import repo, localrepo, manifest, os, urllib, urllib2, util diff --git a/mercurial/streamclone.py b/mercurial/streamclone.py --- a/mercurial/streamclone.py +++ b/mercurial/streamclone.py @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from i18n import gettext as _ +from i18n import _ import os, stat, util, lock # if server supports streaming clone, it advertises "stream" diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from i18n import gettext as _ +from i18n import _ from node import * import cgi, re, sys, os, time, urllib, util, textwrap diff --git a/mercurial/transaction.py b/mercurial/transaction.py --- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -11,7 +11,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from i18n import gettext as _ +from i18n import _ import os class transaction(object): diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -from i18n import gettext as _ +from i18n import _ import errno, getpass, os, re, socket, sys, tempfile import ConfigParser, traceback, util diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -12,7 +12,7 @@ This contains helper routines that are i platform-specific details from the core. """ -from i18n import gettext as _ +from i18n import _ import cStringIO, errno, getpass, popen2, re, shutil, sys, tempfile import os, threading, time, calendar, ConfigParser, locale diff --git a/mercurial/util_win32.py b/mercurial/util_win32.py --- a/mercurial/util_win32.py +++ b/mercurial/util_win32.py @@ -13,7 +13,7 @@ import win32api -from i18n import gettext as _ +from i18n import _ import errno, os, pywintypes, win32con, win32file, win32process import cStringIO, winerror from win32com.shell import shell,shellcon diff --git a/mercurial/verify.py b/mercurial/verify.py --- a/mercurial/verify.py +++ b/mercurial/verify.py @@ -6,7 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. from node import * -from i18n import gettext as _ +from i18n import _ import revlog, mdiff def verify(repo):