changeset 14710:640bfe96ddcf

merge with stable
author Matt Mackall <mpm@selenic.com>
date Tue, 21 Jun 2011 15:26:44 -0500
parents 0e64286760d5 (current diff) 6c7283faa967 (diff)
children 8deebb577751 b069b379829a
files
diffstat 7 files changed, 20 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Jun 21 14:00:26 2011 +0200
+++ b/Makefile	Tue Jun 21 15:26:44 2011 -0500
@@ -91,7 +91,7 @@
 
 i18n/hg.pot: $(PYFILES) $(DOCFILES)
 	$(PYTHON) i18n/hggettext mercurial/commands.py \
-	  hgext/*.py hgext/*/__init__.py mercurial/revset.py \
+	  hgext/*.py hgext/*/__init__.py mercurial/fileset.py mercurial/revset.py \
 	  $(DOCFILES) > i18n/hg.pot
         # All strings marked for translation in Mercurial contain
         # ASCII characters only. But some files contain string
--- a/contrib/check-code.py	Tue Jun 21 14:00:26 2011 +0200
+++ b/contrib/check-code.py	Tue Jun 21 15:26:44 2011 -0500
@@ -178,6 +178,7 @@
     (r'[\s\(](open|file)\([^)]*\)\.',
      "always assign an opened file to a variable, and close it afterwards"),
     (r'(?i)descendent', "the proper spelling is descendAnt"),
+    (r'\.debug\(\_', "don't mark debug messages for translation"),
   ],
   # warnings
   [
--- a/hgext/relink.py	Tue Jun 21 14:00:26 2011 +0200
+++ b/hgext/relink.py	Tue Jun 21 15:26:44 2011 -0500
@@ -117,7 +117,7 @@
         tgt = os.path.join(dst, fn)
         ts = linkfilter(srcpath, tgt, st)
         if not ts:
-            ui.debug(_('not linkable: %s\n') % fn)
+            ui.debug('not linkable: %s\n' % fn)
             continue
         targets.append((fn, ts.st_size))
         ui.progress(_('pruning'), pos, fn, _('files'), total)
@@ -159,7 +159,7 @@
         sfp.close()
         dfp.close()
         if sin:
-            ui.debug(_('not linkable: %s\n') % f)
+            ui.debug('not linkable: %s\n' % f)
             continue
         try:
             relinkfile(source, tgt)
--- a/mercurial/commands.py	Tue Jun 21 14:00:26 2011 +0200
+++ b/mercurial/commands.py	Tue Jun 21 15:26:44 2011 -0500
@@ -4552,7 +4552,7 @@
     """
 
     for f in scmutil.rcpath():
-        ui.debug(_('read config from: %s\n') % f)
+        ui.debug('read config from: %s\n' % f)
     untrusted = bool(opts.get('untrusted'))
     if values:
         sections = [v for v in values if '.' not in v]
--- a/mercurial/commandserver.py	Tue Jun 21 14:00:26 2011 +0200
+++ b/mercurial/commandserver.py	Tue Jun 21 15:26:44 2011 -0500
@@ -155,6 +155,9 @@
             raise util.Abort(_('unknown mode %s') % mode)
 
     def _read(self, size):
+        if not size:
+            return ''
+
         data = self.client.read(size)
 
         # is the other end closed?
@@ -168,7 +171,10 @@
         and writes the return code to the result channel """
 
         length = struct.unpack('>I', self._read(4))[0]
-        args = self._read(length).split('\0')
+        if not length:
+            args = []
+        else:
+            args = self._read(length).split('\0')
 
         # copy the ui so changes to it don't persist between requests
         req = dispatch.request(args, self.ui.copy(), self.repo, self.cin,
--- a/mercurial/dispatch.py	Tue Jun 21 14:00:26 2011 +0200
+++ b/mercurial/dispatch.py	Tue Jun 21 15:26:44 2011 -0500
@@ -267,8 +267,8 @@
                     elif int(m.groups()[0]) <= len(args):
                         return m.group()
                     else:
-                        ui.debug(_("No argument found for substitution "
-                                   "of %i variable in alias '%s' definition.")
+                        ui.debug("No argument found for substitution "
+                                 "of %i variable in alias '%s' definition."
                                  % (int(m.groups()[0]), self.name))
                         return ''
                 cmd = re.sub(r'\$(\d+|\$)', _checkvar, self.definition[1:])
@@ -333,7 +333,7 @@
 
     def __call__(self, ui, *args, **opts):
         if self.shadows:
-            ui.debug(_("alias '%s' shadows command '%s'\n") %
+            ui.debug("alias '%s' shadows command '%s'\n" %
                      (self.name, self.cmdname))
 
         if hasattr(self, 'shell'):
@@ -343,7 +343,7 @@
                 util.checksignature(self.fn)(ui, *args, **opts)
             except error.SignatureError:
                 args = ' '.join([self.cmdname] + self.args)
-                ui.debug(_("alias '%s' expands to '%s'\n") % (self.name, args))
+                ui.debug("alias '%s' expands to '%s'\n" % (self.name, args))
                 raise
 
 def addaliases(ui, cmdtable):
--- a/mercurial/ui.py	Tue Jun 21 14:00:26 2011 +0200
+++ b/mercurial/ui.py	Tue Jun 21 15:26:44 2011 -0500
@@ -159,8 +159,8 @@
         if self.debugflag and not untrusted and self._reportuntrusted:
             uvalue = self._ucfg.get(section, name)
             if uvalue is not None and uvalue != value:
-                self.debug(_("ignoring untrusted configuration option "
-                             "%s.%s = %s\n") % (section, name, uvalue))
+                self.debug("ignoring untrusted configuration option "
+                           "%s.%s = %s\n" % (section, name, uvalue))
         return value
 
     def configpath(self, section, name, default=None, untrusted=False):
@@ -330,8 +330,8 @@
         if self.debugflag and not untrusted and self._reportuntrusted:
             for k, v in self._ucfg.items(section):
                 if self._tcfg.get(section, k) != v:
-                    self.debug(_("ignoring untrusted configuration option "
-                                "%s.%s = %s\n") % (section, k, v))
+                    self.debug("ignoring untrusted configuration option "
+                               "%s.%s = %s\n" % (section, k, v))
         return items
 
     def walkconfig(self, untrusted=False):