# HG changeset patch # User Benoit Boissinot # Date 1166157534 -3600 # Node ID 7034020aeaf9ffc80f2d2fb651271011d8ce9544 # Parent 3b628b5da9e95973a79ad2ab1738965d529de66a# Parent d6cc510dfe5e191b7b19422cbd3b3aaa04e46fc2 merge with main diff -r 3b628b5da9e9 -r 7034020aeaf9 hgext/acl.py --- a/hgext/acl.py Thu Dec 14 23:51:41 2006 +0100 +++ b/hgext/acl.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 hgext/bugzilla.py --- a/hgext/bugzilla.py Thu Dec 14 23:51:41 2006 +0100 +++ b/hgext/bugzilla.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 hgext/extdiff.py --- a/hgext/extdiff.py Thu Dec 14 23:51:41 2006 +0100 +++ b/hgext/extdiff.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 hgext/fetch.py --- a/hgext/fetch.py Thu Dec 14 23:51:41 2006 +0100 +++ b/hgext/fetch.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 hgext/gpg.py --- a/hgext/gpg.py Thu Dec 14 23:51:41 2006 +0100 +++ b/hgext/gpg.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 hgext/hbisect.py --- a/hgext/hbisect.py Thu Dec 14 23:51:41 2006 +0100 +++ b/hgext/hbisect.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 hgext/mq.py --- a/hgext/mq.py Thu Dec 14 23:51:41 2006 +0100 +++ b/hgext/mq.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 diff -r 3b628b5da9e9 -r 7034020aeaf9 hgext/notify.py --- a/hgext/notify.py Thu Dec 14 23:51:41 2006 +0100 +++ b/hgext/notify.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 hgext/patchbomb.py --- a/hgext/patchbomb.py Thu Dec 14 23:51:41 2006 +0100 +++ b/hgext/patchbomb.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 hgext/transplant.py --- a/hgext/transplant.py Thu Dec 14 23:51:41 2006 +0100 +++ b/hgext/transplant.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/archival.py --- a/mercurial/archival.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/archival.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/bundlerepo.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 diff -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/changegroup.py --- a/mercurial/changegroup.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/changegroup.py Fri Dec 15 05:38:54 2006 +0100 @@ -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): diff -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/changelog.py --- a/mercurial/changelog.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/changelog.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/cmdutil.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/commands.py --- a/mercurial/commands.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/commands.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/context.py --- a/mercurial/context.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/context.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/dirstate.py --- a/mercurial/dirstate.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/dirstate.py Fri Dec 15 05:38:54 2006 +0100 @@ -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): diff -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/hg.py --- a/mercurial/hg.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/hg.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/httprepo.py --- a/mercurial/httprepo.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/httprepo.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/i18n.py --- a/mercurial/i18n.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/i18n.py Fri Dec 15 05:38:54 2006 +0100 @@ -7,9 +7,7 @@ of the GNU General Public License, incorporated herein by reference. """ -# the import from gettext is _really_ slow -# for now we use a dummy function -gettext = lambda x: x -#import gettext -#t = gettext.translation('hg', '/usr/share/locale', fallback=1) -#gettext = t.gettext +import gettext +t = gettext.translation('hg', fallback=1) +gettext = t.gettext +_ = gettext diff -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/localrepo.py --- a/mercurial/localrepo.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/localrepo.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/mail.py --- a/mercurial/mail.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/mail.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/manifest.py --- a/mercurial/manifest.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/manifest.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/merge.py --- a/mercurial/merge.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/merge.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/patch.py --- a/mercurial/patch.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/patch.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/revlog.py --- a/mercurial/revlog.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/revlog.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 diff -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/sshrepo.py --- a/mercurial/sshrepo.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/sshrepo.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/sshserver.py --- a/mercurial/sshserver.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/sshserver.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/statichttprepo.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/streamclone.py --- a/mercurial/streamclone.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/streamclone.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/templater.py --- a/mercurial/templater.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/templater.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/transaction.py --- a/mercurial/transaction.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/transaction.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/ui.py --- a/mercurial/ui.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/ui.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 @@ -349,7 +349,7 @@ user = '%s@%s' % (util.getuser(), socket.getfqdn()) except KeyError: raise util.Abort(_("Please specify a username.")) - self.warn(_("No username found, using '%s' instead\n" % user)) + self.warn(_("No username found, using '%s' instead\n") % user) return user def shortuser(self, user): diff -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/util.py --- a/mercurial/util.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/util.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 diff -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/util_win32.py --- a/mercurial/util_win32.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/util_win32.py Fri Dec 15 05:38:54 2006 +0100 @@ -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 -r 3b628b5da9e9 -r 7034020aeaf9 mercurial/verify.py --- a/mercurial/verify.py Thu Dec 14 23:51:41 2006 +0100 +++ b/mercurial/verify.py Fri Dec 15 05:38:54 2006 +0100 @@ -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): diff -r 3b628b5da9e9 -r 7034020aeaf9 setup.py --- a/setup.py Thu Dec 14 23:51:41 2006 +0100 +++ b/setup.py Fri Dec 15 05:38:54 2006 +0100 @@ -14,6 +14,8 @@ from distutils.command.install_data import install_data import mercurial.version +import mercurial.demandimport +mercurial.demandimport.enable = lambda: None # py2exe needs to be installed to work try: @@ -34,8 +36,7 @@ pass except ImportError: - py2exe_for_demandload = None - + pass # specify version string, otherwise 'hg identify' will be used: version = '' @@ -48,10 +49,6 @@ mercurial.version.remember_version(version) cmdclass = {'install_data': install_package_data} -py2exe_opts = {} -if py2exe_for_demandload is not None: - cmdclass['py2exe'] = py2exe_for_demandload - py2exe_opts['console'] = ['hg'] setup(name='mercurial', version=mercurial.version.get_version(), @@ -73,4 +70,4 @@ license='COPYING', readme='contrib/macosx/Readme.html', welcome='contrib/macosx/Welcome.html')), - **py2exe_opts) + console=['hg'])