changeset 3897:7034020aeaf9

merge with main
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 15 Dec 2006 05:38:54 +0100
parents 3b628b5da9e9 (current diff) d6cc510dfe5e (diff)
children 316cd5b0c940
files
diffstat 38 files changed, 45 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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
--- 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
--- 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
 
--- 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):
--- 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
 
--- 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
 
--- 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
--- 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:
--- 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
--- 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
 
--- 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
--- 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):
--- 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):
--- 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 = ':'
--- 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
--- 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):
--- 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):
--- 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
--- 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
 
--- 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
--- 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
--- 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):
--- 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):
--- 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):
--- 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
--- 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
 
--- 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):
--- 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
 
--- 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
 
--- 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"
--- 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
 
--- 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):
--- 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):
--- 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
 
--- 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
--- 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):
--- 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'])