Simplify i18n imports
authorMatt Mackall <mpm@selenic.com>
Thu, 14 Dec 2006 20:25:19 -0600
changeset 3891 6b4127c7d52a
parent 3890 2eec996f2fb9
child 3892 d6cc510dfe5e
Simplify i18n imports
hgext/acl.py
hgext/bugzilla.py
hgext/extdiff.py
hgext/fetch.py
hgext/gpg.py
hgext/hbisect.py
hgext/mq.py
hgext/notify.py
hgext/patchbomb.py
hgext/transplant.py
mercurial/archival.py
mercurial/bundlerepo.py
mercurial/changegroup.py
mercurial/changelog.py
mercurial/cmdutil.py
mercurial/commands.py
mercurial/context.py
mercurial/dirstate.py
mercurial/hg.py
mercurial/httprepo.py
mercurial/localrepo.py
mercurial/mail.py
mercurial/manifest.py
mercurial/merge.py
mercurial/patch.py
mercurial/revlog.py
mercurial/sshrepo.py
mercurial/sshserver.py
mercurial/statichttprepo.py
mercurial/streamclone.py
mercurial/templater.py
mercurial/transaction.py
mercurial/ui.py
mercurial/util.py
mercurial/util_win32.py
mercurial/verify.py
--- a/hgext/acl.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/hgext/acl.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
--- a/hgext/bugzilla.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/hgext/bugzilla.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
--- a/hgext/extdiff.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/hgext/extdiff.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
--- a/hgext/fetch.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/hgext/fetch.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
 
--- a/hgext/gpg.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/hgext/gpg.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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):
--- a/hgext/hbisect.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/hgext/hbisect.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
 
--- a/hgext/mq.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/hgext/mq.py	Thu Dec 14 20:25:19 2006 -0600
@@ -29,7 +29,7 @@
 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
 
--- a/hgext/notify.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/hgext/notify.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
--- a/hgext/patchbomb.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/hgext/patchbomb.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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:
--- a/hgext/transplant.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/hgext/transplant.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
--- a/mercurial/archival.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/archival.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
 
--- a/mercurial/bundlerepo.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/bundlerepo.py	Thu Dec 14 20:25:19 2006 -0600
@@ -11,7 +11,7 @@
 """
 
 from node import *
-from i18n import gettext as _
+from i18n import _
 import changegroup, util, os, struct, bz2, tempfile
 
 import localrepo, changelog, manifest, filelog, revlog
--- a/mercurial/changegroup.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/changegroup.py	Thu Dec 14 20:25:19 2006 -0600
@@ -7,7 +7,7 @@
 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):
--- a/mercurial/changelog.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/changelog.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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):
--- a/mercurial/cmdutil.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/cmdutil.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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 = ':'
--- a/mercurial/commands.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/commands.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
--- a/mercurial/context.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/context.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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):
--- a/mercurial/dirstate.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/dirstate.py	Thu Dec 14 20:25:19 2006 -0600
@@ -8,7 +8,7 @@
 """
 
 from node import *
-from i18n import gettext as _
+from i18n import _
 import struct, os, time, bisect, stat, strutil, util, re, errno
 
 class dirstate(object):
--- a/mercurial/hg.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/hg.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
--- a/mercurial/httprepo.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/httprepo.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
 
--- a/mercurial/localrepo.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/localrepo.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
--- a/mercurial/mail.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/mail.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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):
--- a/mercurial/manifest.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/manifest.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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):
--- a/mercurial/merge.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/merge.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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):
--- a/mercurial/patch.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/patch.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
--- a/mercurial/revlog.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/revlog.py	Thu Dec 14 20:25:19 2006 -0600
@@ -11,7 +11,7 @@
 """
 
 from node import *
-from i18n import gettext as _
+from i18n import _
 import binascii, changegroup, errno, ancestor, mdiff, os
 import sha, struct, util, zlib
 
--- a/mercurial/sshrepo.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/sshrepo.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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):
--- a/mercurial/sshserver.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/sshserver.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
 
--- a/mercurial/statichttprepo.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/statichttprepo.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
 
--- a/mercurial/streamclone.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/streamclone.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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"
--- a/mercurial/templater.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/templater.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
 
--- a/mercurial/transaction.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/transaction.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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):
--- a/mercurial/ui.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/ui.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
 
--- a/mercurial/util.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/util.py	Thu Dec 14 20:25:19 2006 -0600
@@ -12,7 +12,7 @@
 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
 
--- a/mercurial/util_win32.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/util_win32.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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
--- a/mercurial/verify.py	Thu Dec 14 20:23:25 2006 -0600
+++ b/mercurial/verify.py	Thu Dec 14 20:25:19 2006 -0600
@@ -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):