Patchwork [3,of,8,v2] python3: handle io/cStringIO divergence

login
register
mail settings
Submitter timeless@mozdev.org
Date March 30, 2016, 4:33 a.m.
Message ID <7c1f1230c39214666638.1459312398@waste.org>
Download mbox | patch
Permalink /patch/14164/
State Accepted
Headers show

Comments

timeless@mozdev.org - March 30, 2016, 4:33 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1459198918 0
#      Mon Mar 28 21:01:58 2016 +0000
# Node ID 7c1f1230c392146666387287483147e3a7aaec66
# Parent  7d4296c48aaba89e3159186654ce95a0b0c96d48
python3: handle io/cStringIO divergence
Gregory Szorc - March 30, 2016, 6:34 a.m.
FWIW, the io.StringIO module shares the same interface as
StringIO.StringIO() and cStringIO.StringIO() and can be used
interchangeably as long as types aren't being coerced (StringIO.StringIO
allows str<->unicode but io.StringIO doesn't). However, the last I checked
io.StringIO() is implemented in pure Python in 2.7 and is significantly
slower than StringIO/cStringIO. So watch out. (This patch does the right
thing, however.)

On Tue, Mar 29, 2016 at 9:33 PM, timeless <timeless@mozdev.org> wrote:

> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1459198918 0
> #      Mon Mar 28 21:01:58 2016 +0000
> # Node ID 7c1f1230c392146666387287483147e3a7aaec66
> # Parent  7d4296c48aaba89e3159186654ce95a0b0c96d48
> python3: handle io/cStringIO divergence
>
> diff --git a/hgext/convert/cvs.py b/hgext/convert/cvs.py
> --- a/hgext/convert/cvs.py
> +++ b/hgext/convert/cvs.py
> @@ -6,12 +6,16 @@
>  # GNU General Public License version 2 or any later version.
>  from __future__ import absolute_import
>
> -import cStringIO
>  import errno
>  import os
>  import re
>  import socket
>
> +try:
> +    import cStringIO as io
> +except ImportError:
> +    import io
> +
>  from mercurial import (
>      encoding,
>      error,
> @@ -24,7 +28,7 @@
>      cvsps,
>  )
>
> -StringIO = cStringIO.StringIO
> +StringIO = io.StringIO
>  checktool = common.checktool
>  commit = common.commit
>  converter_source = common.converter_source
> diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py
> --- a/hgext/convert/hg.py
> +++ b/hgext/convert/hg.py
> @@ -18,11 +18,15 @@
>  #   source.
>  from __future__ import absolute_import
>
> -import cStringIO
>  import os
>  import re
>  import time
>
> +try:
> +    import cStringIO as io
> +except ImportError:
> +    import io
> +
>  from mercurial import (
>      bookmarks,
>      context,
> @@ -137,7 +141,7 @@
>              self.before()
>
>      def _rewritetags(self, source, revmap, data):
> -        fp = cStringIO.StringIO()
> +        fp = io.StringIO()
>          for line in data.splitlines():
>              s = line.split(' ', 1)
>              if len(s) != 2:
> @@ -152,7 +156,7 @@
>          return fp.getvalue()
>
>      def _rewritesubstate(self, source, data):
> -        fp = cStringIO.StringIO()
> +        fp = io.StringIO()
>          for line in data.splitlines():
>              s = line.split(' ', 1)
>              if len(s) != 2:
> diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
> --- a/hgext/patchbomb.py
> +++ b/hgext/patchbomb.py
> @@ -65,13 +65,17 @@
>  '''
>  from __future__ import absolute_import
>
> -import cStringIO
>  import email as emailmod
>  import errno
>  import os
>  import socket
>  import tempfile
>
> +try:
> +    import cStringIO as io
> +except ImportError:
> +    import io
> +
>  from mercurial import (
>      cmdutil,
>      commands,
> @@ -228,7 +232,7 @@
>          if r == prev and (repo[None].files() or repo[None].deleted()):
>              ui.warn(_('warning: working directory has '
>                        'uncommitted changes\n'))
> -        output = cStringIO.StringIO()
> +        output = io.StringIO()
>          cmdutil.export(repo, [r], fp=output,
>                       opts=patch.difffeatureopts(ui, opts, git=True))
>          yield output.getvalue().split('\n')
> @@ -721,7 +725,7 @@
>              if not mbox:
>                  # Exim does not remove the Bcc field
>                  del m['Bcc']
> -            fp = cStringIO.StringIO()
> +            fp = io.StringIO()
>              generator = emailmod.Generator.Generator(fp,
> mangle_from_=False)
>              generator.flatten(m, 0)
>              sendmail(sender_addr, to + bcc + cc, fp.getvalue())
> diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py
> +++ b/mercurial/cmdutil.py
> @@ -7,13 +7,17 @@
>
>  from __future__ import absolute_import
>
> -import cStringIO
>  import errno
>  import os
>  import re
>  import sys
>  import tempfile
>
> +try:
> +    import cStringIO as io
> +except ImportError:
> +    import io
> +
>  from .i18n import _
>  from .node import (
>      bin,
> @@ -199,7 +203,7 @@
>                  util.copyfile(repo.wjoin(f), tmpname, copystat=True)
>                  backups[f] = tmpname
>
> -            fp = cStringIO.StringIO()
> +            fp = io.StringIO()
>              for c in chunks:
>                  fname = c.filename()
>                  if fname in backups:
> @@ -3290,7 +3294,7 @@
>
>          newlyaddedandmodifiedfiles = newandmodified(chunks,
> originalchunks)
>          # Apply changes
> -        fp = cStringIO.StringIO()
> +        fp = io.StringIO()
>          for c in chunks:
>              c.write(fp)
>          dopatch = fp.tell()
> diff --git a/mercurial/crecord.py b/mercurial/crecord.py
> --- a/mercurial/crecord.py
> +++ b/mercurial/crecord.py
> @@ -10,7 +10,6 @@
>
>  from __future__ import absolute_import
>
> -import cStringIO
>  import locale
>  import os
>  import re
> @@ -18,6 +17,11 @@
>  import struct
>  import sys
>
> +try:
> +    import cStringIO as io
> +except ImportError:
> +    import io
> +
>  from .i18n import _
>  from . import (
>      encoding,
> @@ -238,7 +242,7 @@
>
>
>      def prettystr(self):
> -        x = cStringIO.StringIO()
> +        x = io.StringIO()
>          self.pretty(x)
>          return x.getvalue()
>
> @@ -449,7 +453,7 @@
>      pretty = write
>
>      def prettystr(self):
> -        x = cStringIO.StringIO()
> +        x = io.StringIO()
>          self.pretty(x)
>          return x.getvalue()
>
> @@ -1506,7 +1510,7 @@
>                  return None
>
>              # write the initial patch
> -            patch = cStringIO.StringIO()
> +            patch = io.StringIO()
>              patch.write(diffhelptext + hunkhelptext)
>              chunk.header.write(patch)
>              chunk.write(patch)
> diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py
> --- a/mercurial/hgweb/protocol.py
> +++ b/mercurial/hgweb/protocol.py
> @@ -7,11 +7,15 @@
>
>  from __future__ import absolute_import
>
> -import cStringIO
>  import cgi
>  import urllib
>  import zlib
>
> +try:
> +    import cStringIO as io
> +except ImportError:
> +    import io
> +
>  from .common import (
>      HTTP_OK,
>  )
> @@ -66,7 +70,7 @@
>              fp.write(s)
>      def redirect(self):
>          self.oldio = self.ui.fout, self.ui.ferr
> -        self.ui.ferr = self.ui.fout = cStringIO.StringIO()
> +        self.ui.ferr = self.ui.fout = io.StringIO()
>      def restore(self):
>          val = self.ui.fout.getvalue()
>          self.ui.ferr, self.ui.fout = self.oldio
> diff --git a/mercurial/patch.py b/mercurial/patch.py
> --- a/mercurial/patch.py
> +++ b/mercurial/patch.py
> @@ -8,7 +8,6 @@
>
>  from __future__ import absolute_import
>
> -import cStringIO
>  import collections
>  import copy
>  import email
> @@ -20,6 +19,11 @@
>  import tempfile
>  import zlib
>
> +try:
> +    import cStringIO as io
> +except ImportError:
> +    import io
> +
>  from .i18n import _
>  from .node import (
>      hex,
> @@ -60,7 +64,7 @@
>          return len(l) == 2 and ' ' not in l[0]
>
>      def chunk(lines):
> -        return cStringIO.StringIO(''.join(lines))
> +        return io.StringIO(''.join(lines))
>
>      def hgsplit(stream, cur):
>          inheader = True
> @@ -93,7 +97,7 @@
>
>      def mimesplit(stream, cur):
>          def msgfp(m):
> -            fp = cStringIO.StringIO()
> +            fp = io.StringIO()
>              g = email.Generator.Generator(fp, mangle_from_=False)
>              g.flatten(m)
>              fp.seek(0)
> @@ -246,7 +250,7 @@
>
>                  ui.debug('found patch at byte %d\n' % m.start(0))
>                  diffs_seen += 1
> -                cfp = cStringIO.StringIO()
> +                cfp = io.StringIO()
>                  for line in payload[:m.start(0)].splitlines():
>                      if line.startswith('# HG changeset patch') and not
> hgpatch:
>                          ui.debug('patch generated by hg export\n')
> @@ -1057,7 +1061,7 @@
>                          continue
>                      # Remove comment lines
>                      patchfp = open(patchfn)
> -                    ncpatchfp = cStringIO.StringIO()
> +                    ncpatchfp = io.StringIO()
>                      for line in patchfp:
>                          if not line.startswith('#'):
>                              ncpatchfp.write(line)
> @@ -1440,7 +1444,12 @@
>      ...     hunkscomingfromfilterpatch.extend(h.hunks)
>
>      >>> reversedhunks = reversehunks(hunkscomingfromfilterpatch)
> -    >>> fp = cStringIO.StringIO()
> +    >>> try:
> +    ...     import cStringIO as io
> +    ... except ImportError:
> +    ...     import io
> +
> +    >>> fp = io.StringIO()
>      >>> for c in reversedhunks:
>      ...      c.write(fp)
>      >>> fp.seek(0)
> @@ -1553,7 +1562,7 @@
>              }
>
>      p = parser()
> -    fp = cStringIO.StringIO()
> +    fp = io.StringIO()
>      fp.write(''.join(originalchunks))
>      fp.seek(0)
>
> @@ -1732,7 +1741,7 @@
>          pos = lr.fp.tell()
>          fp = lr.fp
>      except IOError:
> -        fp = cStringIO.StringIO(lr.fp.read())
> +        fp = io.StringIO(lr.fp.read())
>      gitlr = linereader(fp)
>      gitlr.push(firstline)
>      gitpatches = readgitpatch(gitlr)
> diff --git a/mercurial/pure/mpatch.py b/mercurial/pure/mpatch.py
> --- a/mercurial/pure/mpatch.py
> +++ b/mercurial/pure/mpatch.py
> @@ -7,10 +7,14 @@
>
>  from __future__ import absolute_import
>
> -import cStringIO
>  import struct
>
> -StringIO = cStringIO.StringIO
> +try:
> +    import cStringIO as io
> +except ImportError:
> +    import io
> +
> +StringIO = io.StringIO
>
>  # This attempts to apply a series of patches in time proportional to
>  # the total size of the patches, rather than patches * len(text). This
> diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
> --- a/mercurial/pure/parsers.py
> +++ b/mercurial/pure/parsers.py
> @@ -7,10 +7,14 @@
>
>  from __future__ import absolute_import
>
> -import cStringIO
>  import struct
>  import zlib
>
> +try:
> +    import cStringIO as io
> +except ImportError:
> +    import io
> +
>  from .node import nullid
>
>  _pack = struct.pack
> @@ -90,7 +94,7 @@
>
>  def pack_dirstate(dmap, copymap, pl, now):
>      now = int(now)
> -    cs = cStringIO.StringIO()
> +    cs = io.StringIO()
>      write = cs.write
>      write("".join(pl))
>      for f, e in dmap.iteritems():
> diff --git a/mercurial/url.py b/mercurial/url.py
> --- a/mercurial/url.py
> +++ b/mercurial/url.py
> @@ -10,13 +10,17 @@
>  from __future__ import absolute_import
>
>  import base64
> -import cStringIO
>  import httplib
>  import os
>  import socket
>  import urllib
>  import urllib2
>
> +try:
> +    import cStringIO as io
> +except ImportError:
> +    import io
> +
>  from .i18n import _
>  from . import (
>      error,
> @@ -273,7 +277,7 @@
>          res.length = None
>          res.chunked = 0
>          res.will_close = 1
> -        res.msg = httplib.HTTPMessage(cStringIO.StringIO())
> +        res.msg = httplib.HTTPMessage(io.StringIO())
>          return False
>
>      res.msg = httplib.HTTPMessage(res.fp)
> diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
> --- a/tests/test-check-py3-compat.t
> +++ b/tests/test-check-py3-compat.t
> @@ -123,153 +123,152 @@
>    contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape'
> codec can't decode bytes in position *-*: malformed \N character escape
> (<unknown>, line *) (glob)
>    contrib/import-checker.py: invalid syntax: Missing parentheses in call
> to 'print' (<unknown>, line *) (glob)
>    doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *)
> (glob)
> -  hgext/acl.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> +  hgext/acl.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
>    hgext/automv.py: error importing module: <SyntaxError> invalid syntax
> (commands.py, line *) (line *) (glob)
> -  hgext/blackbox.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> +  hgext/blackbox.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
>    hgext/bugzilla.py: error importing module: <ImportError> No module
> named 'urlparse' (line *) (glob)
> -  hgext/censor.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> +  hgext/censor.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
>    hgext/chgserver.py: error importing module: <ImportError> No module
> named 'SocketServer' (line *) (glob)
> -  hgext/children.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/churn.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/clonebundles.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> +  hgext/children.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/churn.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/clonebundles.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *)
> (glob)
>    hgext/convert/bzr.py: error importing module: <SystemError> Parent
> module 'hgext.convert' not loaded, cannot perform relative import (line *)
> (glob)
>    hgext/convert/common.py: error importing module: <ImportError> No
> module named 'cPickle' (line *) (glob)
> -  hgext/convert/convcmd.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/convert/cvs.py: error importing module: <ImportError> No module
> named 'cStringIO' (line *) (glob)
> +  hgext/convert/convcmd.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  hgext/convert/cvs.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    hgext/convert/cvsps.py: error importing module: <ImportError> No module
> named 'cPickle' (line *) (glob)
> -  hgext/convert/darcs.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> +  hgext/convert/darcs.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    hgext/convert/filemap.py: error importing module: <SystemError> Parent
> module 'hgext.convert' not loaded, cannot perform relative import (line *)
> (glob)
> -  hgext/convert/git.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/convert/gnuarch.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/convert/hg.py: error importing module: <ImportError> No module
> named 'cStringIO' (line *) (glob)
> -  hgext/convert/monotone.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/convert/p*.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> +  hgext/convert/git.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  hgext/convert/gnuarch.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  hgext/convert/hg.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  hgext/convert/monotone.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  hgext/convert/p*.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    hgext/convert/subversion.py: error importing module: <ImportError> No
> module named 'cPickle' (line *) (glob)
>    hgext/convert/transport.py: error importing module: <ImportError> No
> module named 'svn.client' (line *) (glob)
> -  hgext/eol.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/extdiff.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/factotum.py: error importing: <ImportError> No module named
> 'cStringIO' (error at url.py:*) (glob)
> +  hgext/eol.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/extdiff.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/factotum.py: error importing: <ImportError> No module named
> 'httplib' (error at url.py:*) (glob)
>    hgext/fetch.py: error importing module: <SyntaxError> invalid syntax
> (commands.py, line *) (line *) (glob)
> -  hgext/fsmonitor/state.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/fsmonitor/watchmanclient.py: error importing: <ImportError> No
> module named 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/gpg.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/graphlog.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/hgcia.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/hgk.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/highlight/highlight.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> +  hgext/fsmonitor/state.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  hgext/fsmonitor/watchmanclient.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  hgext/gpg.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/graphlog.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/hgcia.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/hgk.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/highlight/highlight.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    hgext/histedit.py: error importing module: <SyntaxError> invalid syntax
> (bundle*.py, line *) (line *) (glob)
> -  hgext/keyword.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/largefiles/basestore.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/largefiles/lfcommands.py: error importing: <ImportError> No
> module named 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/largefiles/lfutil.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> +  hgext/keyword.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/largefiles/basestore.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  hgext/largefiles/lfcommands.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  hgext/largefiles/lfutil.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    hgext/largefiles/localstore.py: error importing module: <ImportError>
> No module named 'lfutil' (line *) (glob)
> -  hgext/largefiles/overrides.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> +  hgext/largefiles/overrides.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    hgext/largefiles/proto.py: error importing module: <ImportError> No
> module named 'urllib2' (line *) (glob)
>    hgext/largefiles/remotestore.py: error importing module: <ImportError>
> No module named 'urllib2' (line *) (glob)
> -  hgext/largefiles/reposetup.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> +  hgext/largefiles/reposetup.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    hgext/largefiles/uisetup.py: error importing module: <SyntaxError>
> invalid syntax (archival.py, line *) (line *) (glob)
>    hgext/largefiles/wirestore.py: error importing module: <ImportError> No
> module named 'lfutil' (line *) (glob)
> -  hgext/mq.py: error importing: <ImportError> No module named 'cStringIO'
> (error at parsers.py:*) (glob)
> -  hgext/notify.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/pager.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/patchbomb.py: error importing module: <ImportError> No module
> named 'cStringIO' (line *) (glob)
> -  hgext/purge.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/rebase.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  hgext/record.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/relink.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/schemes.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  hgext/share.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> +  hgext/mq.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/notify.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/pager.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/patchbomb.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  hgext/purge.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/rebase.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/record.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/relink.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/schemes.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  hgext/share.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
>    hgext/shelve.py: error importing module: <SyntaxError> invalid syntax
> (bundle*.py, line *) (line *) (glob)
> -  hgext/strip.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> +  hgext/strip.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
>    hgext/transplant.py: error importing: <SyntaxError> invalid syntax
> (bundle*.py, line *) (error at bundlerepo.py:*) (glob)
> -  hgext/win*text.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> +  hgext/win*text.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
>    mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line
> *) (glob)
> -  mercurial/bookmarks.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/branchmap.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> +  mercurial/bookmarks.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/branchmap.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line
> *) (glob)
>    mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid
> syntax (bundle*.py, line *) (line *) (glob)
>    mercurial/byterange.py: error importing module: <ImportError> No module
> named 'urllib2' (line *) (glob)
> -  mercurial/changegroup.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/changelog.py: error importing: <ImportError> No module named
> 'cStringIO' (error at mpatch.py:*) (glob)
> -  mercurial/cmdutil.py: error importing module: <ImportError> No module
> named 'cStringIO' (line *) (glob)
> +  mercurial/changegroup.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/changelog.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/cmdutil.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line
> *) (glob)
>    mercurial/commandserver.py: error importing module: <ImportError> No
> module named 'SocketServer' (line *) (glob)
> -  mercurial/config.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/context.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/copies.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/crecord.py: error importing module: <ImportError> No module
> named 'cStringIO' (line *) (glob)
> -  mercurial/destutil.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/dirstate.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/discovery.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/dispatch.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> +  mercurial/config.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/context.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/copies.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/crecord.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/destutil.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/dirstate.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/discovery.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/dispatch.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    mercurial/exchange.py: error importing module: <ImportError> No module
> named 'urllib2' (line *) (glob)
> -  mercurial/extensions.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  mercurial/filelog.py: error importing: <ImportError> No module named
> 'cStringIO' (error at mpatch.py:*) (glob)
> -  mercurial/filemerge.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/fileset.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> +  mercurial/extensions.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/filelog.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/filemerge.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/fileset.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
>    mercurial/formatter.py: error importing module: <ImportError> No module
> named 'cPickle' (line *) (glob)
> -  mercurial/graphmod.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/help.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  mercurial/hg.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> +  mercurial/graphmod.py: error importing: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*)
> (glob)
> +  mercurial/help.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
> +  mercurial/hg.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
>    mercurial/hgweb/common.py: error importing module: <ImportError> No
> module named 'BaseHTTPServer' (line *) (glob)
>    mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError>
> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import
> (line *) (glob)
>    mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError>
> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import
> (line *) (glob)
> -  mercurial/hgweb/protocol.py: error importing module: <ImportError> No
> module named 'cStringIO' (line *) (glob)
> +  mercurial/hgweb/protocol.py: error importing module: <SystemError>
> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import
> (line *) (glob)
>    mercurial/hgweb/request.py: error importing module: <SystemError>
> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import
> (line *) (glob)
>    mercurial/hgweb/server.py: error importing module: <ImportError> No
> module named 'BaseHTTPServer' (line *) (glob)
>    mercurial/hgweb/webcommands.py: error importing module: <SystemError>
> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import
> (line *) (glob)
>    mercurial/hgweb/webutil.py: error importing module: <SystemError>
> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import
> (line *) (glob)
>    mercurial/hgweb/wsgicgi.py: error importing module: <SystemError>
> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import
> (line *) (glob)
> -  mercurial/hook.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> +  mercurial/hook.py: error importing: <AttributeError> 'NullTranslations'
> object has no attribute 'ugettext' (error at i18n.py:*) (glob)
>    mercurial/httpclient/_readers.py: error importing module: <ImportError>
> No module named 'httplib' (line *) (glob)
>    mercurial/httpconnection.py: error importing module: <ImportError> No
> module named 'urllib2' (line *) (glob)
>    mercurial/httppeer.py: error importing module: <ImportError> No module
> named 'httplib' (line *) (glob)
>    mercurial/keepalive.py: error importing module: <ImportError> No module
> named 'httplib' (line *) (glob)
> -  mercurial/localrepo.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/lock.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/mail.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/manifest.py: error importing: <ImportError> No module named
> 'cStringIO' (error at mpatch.py:*) (glob)
> -  mercurial/match.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/mdiff.py: error importing: <ImportError> No module named
> 'cStringIO' (error at mpatch.py:*) (glob)
> -  mercurial/merge.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/minirst.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/namespaces.py: error importing: <ImportError> No module named
> 'cStringIO' (error at patch.py:*) (glob)
> -  mercurial/obsolete.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/patch.py: error importing module: <ImportError> No module
> named 'cStringIO' (line *) (glob)
> -  mercurial/pathutil.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/peer.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/pure/mpatch.py: error importing module: <ImportError> No
> module named 'cStringIO' (line *) (glob)
> -  mercurial/pure/parsers.py: error importing module: <ImportError> No
> module named 'cStringIO' (line *) (glob)
> -  mercurial/pushkey.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/pvec.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/registrar.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> +  mercurial/localrepo.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/lock.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/mail.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/manifest.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/match.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/mdiff.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/merge.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/minirst.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/namespaces.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/obsolete.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/patch.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/pathutil.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/peer.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/pure/parsers.py: error importing module: <ImportError> No
> module named 'mercurial.pure.node' (line *) (glob)
> +  mercurial/pushkey.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/pvec.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/registrar.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
>    mercurial/repair.py: error importing module: <SyntaxError> invalid
> syntax (bundle*.py, line *) (line *) (glob)
> -  mercurial/repoview.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/revlog.py: error importing: <ImportError> No module named
> 'cStringIO' (error at mpatch.py:*) (glob)
> -  mercurial/revset.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/scmutil.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> +  mercurial/repoview.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/revlog.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/revset.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/scmutil.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
>    mercurial/scmwindows.py: error importing module: <ImportError> No
> module named '_winreg' (line *) (glob)
> -  mercurial/similar.py: error importing: <ImportError> No module named
> 'cStringIO' (error at mpatch.py:*) (glob)
> -  mercurial/simplemerge.py: error importing: <ImportError> No module
> named 'cStringIO' (error at mpatch.py:*) (glob)
> -  mercurial/sshpeer.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/sshserver.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  mercurial/sslutil.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> +  mercurial/similar.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/simplemerge.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/sshpeer.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/sshserver.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/sslutil.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
>    mercurial/statichttprepo.py: error importing module: <ImportError> No
> module named 'urllib2' (line *) (glob)
> -  mercurial/store.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/streamclone.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/subrepo.py: error importing: <ImportError> No module named
> 'cStringIO' (error at cmdutil.py:*) (glob)
> -  mercurial/tagmerge.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/tags.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/templatefilters.py: error importing: <ImportError> No module
> named 'cStringIO' (error at patch.py:*) (glob)
> -  mercurial/templatekw.py: error importing: <ImportError> No module named
> 'cStringIO' (error at patch.py:*) (glob)
> -  mercurial/templater.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/transaction.py: error importing: <ImportError> No module
> named 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/ui.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/unionrepo.py: error importing: <ImportError> No module named
> 'cStringIO' (error at mpatch.py:*) (glob)
> -  mercurial/url.py: error importing module: <ImportError> No module named
> 'cStringIO' (line *) (glob)
> -  mercurial/util.py: error importing: <ImportError> No module named
> 'cStringIO' (error at parsers.py:*) (glob)
> -  mercurial/verify.py: error importing: <ImportError> No module named
> 'cStringIO' (error at mpatch.py:*) (glob)
> +  mercurial/store.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/streamclone.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/subrepo.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/tagmerge.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/tags.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/templatefilters.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/templatekw.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/templater.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/transaction.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/ui.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/unionrepo.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/url.py: error importing module: <ImportError> No module named
> 'httplib' (line *) (glob)
> +  mercurial/util.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
> +  mercurial/verify.py: error importing module: <AttributeError>
> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
>    mercurial/win*.py: error importing module: <ImportError> No module
> named 'msvcrt' (line *) (glob)
>    mercurial/windows.py: error importing module: <ImportError> No module
> named '_winreg' (line *) (glob)
>    mercurial/wireproto.py: error importing module: <SyntaxError> invalid
> syntax (bundle*.py, line *) (line *) (glob)
> @@ -302,5 +301,4 @@
>    tests/test-ui-verbosity.py: invalid syntax: Missing parentheses in call
> to 'print' (<unknown>, line *) (glob)
>    tests/test-walkrepo.py: invalid syntax: invalid syntax (<unknown>, line
> *) (glob)
>    tests/test-wireproto.py: invalid syntax: invalid syntax (<unknown>,
> line *) (glob)
> -
>  #endif
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/hgext/convert/cvs.py b/hgext/convert/cvs.py
--- a/hgext/convert/cvs.py
+++ b/hgext/convert/cvs.py
@@ -6,12 +6,16 @@ 
 # GNU General Public License version 2 or any later version.
 from __future__ import absolute_import
 
-import cStringIO
 import errno
 import os
 import re
 import socket
 
+try:
+    import cStringIO as io
+except ImportError:
+    import io
+
 from mercurial import (
     encoding,
     error,
@@ -24,7 +28,7 @@ 
     cvsps,
 )
 
-StringIO = cStringIO.StringIO
+StringIO = io.StringIO
 checktool = common.checktool
 commit = common.commit
 converter_source = common.converter_source
diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -18,11 +18,15 @@ 
 #   source.
 from __future__ import absolute_import
 
-import cStringIO
 import os
 import re
 import time
 
+try:
+    import cStringIO as io
+except ImportError:
+    import io
+
 from mercurial import (
     bookmarks,
     context,
@@ -137,7 +141,7 @@ 
             self.before()
 
     def _rewritetags(self, source, revmap, data):
-        fp = cStringIO.StringIO()
+        fp = io.StringIO()
         for line in data.splitlines():
             s = line.split(' ', 1)
             if len(s) != 2:
@@ -152,7 +156,7 @@ 
         return fp.getvalue()
 
     def _rewritesubstate(self, source, data):
-        fp = cStringIO.StringIO()
+        fp = io.StringIO()
         for line in data.splitlines():
             s = line.split(' ', 1)
             if len(s) != 2:
diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -65,13 +65,17 @@ 
 '''
 from __future__ import absolute_import
 
-import cStringIO
 import email as emailmod
 import errno
 import os
 import socket
 import tempfile
 
+try:
+    import cStringIO as io
+except ImportError:
+    import io
+
 from mercurial import (
     cmdutil,
     commands,
@@ -228,7 +232,7 @@ 
         if r == prev and (repo[None].files() or repo[None].deleted()):
             ui.warn(_('warning: working directory has '
                       'uncommitted changes\n'))
-        output = cStringIO.StringIO()
+        output = io.StringIO()
         cmdutil.export(repo, [r], fp=output,
                      opts=patch.difffeatureopts(ui, opts, git=True))
         yield output.getvalue().split('\n')
@@ -721,7 +725,7 @@ 
             if not mbox:
                 # Exim does not remove the Bcc field
                 del m['Bcc']
-            fp = cStringIO.StringIO()
+            fp = io.StringIO()
             generator = emailmod.Generator.Generator(fp, mangle_from_=False)
             generator.flatten(m, 0)
             sendmail(sender_addr, to + bcc + cc, fp.getvalue())
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -7,13 +7,17 @@ 
 
 from __future__ import absolute_import
 
-import cStringIO
 import errno
 import os
 import re
 import sys
 import tempfile
 
+try:
+    import cStringIO as io
+except ImportError:
+    import io
+
 from .i18n import _
 from .node import (
     bin,
@@ -199,7 +203,7 @@ 
                 util.copyfile(repo.wjoin(f), tmpname, copystat=True)
                 backups[f] = tmpname
 
-            fp = cStringIO.StringIO()
+            fp = io.StringIO()
             for c in chunks:
                 fname = c.filename()
                 if fname in backups:
@@ -3290,7 +3294,7 @@ 
 
         newlyaddedandmodifiedfiles = newandmodified(chunks, originalchunks)
         # Apply changes
-        fp = cStringIO.StringIO()
+        fp = io.StringIO()
         for c in chunks:
             c.write(fp)
         dopatch = fp.tell()
diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -10,7 +10,6 @@ 
 
 from __future__ import absolute_import
 
-import cStringIO
 import locale
 import os
 import re
@@ -18,6 +17,11 @@ 
 import struct
 import sys
 
+try:
+    import cStringIO as io
+except ImportError:
+    import io
+
 from .i18n import _
 from . import (
     encoding,
@@ -238,7 +242,7 @@ 
 
 
     def prettystr(self):
-        x = cStringIO.StringIO()
+        x = io.StringIO()
         self.pretty(x)
         return x.getvalue()
 
@@ -449,7 +453,7 @@ 
     pretty = write
 
     def prettystr(self):
-        x = cStringIO.StringIO()
+        x = io.StringIO()
         self.pretty(x)
         return x.getvalue()
 
@@ -1506,7 +1510,7 @@ 
                 return None
 
             # write the initial patch
-            patch = cStringIO.StringIO()
+            patch = io.StringIO()
             patch.write(diffhelptext + hunkhelptext)
             chunk.header.write(patch)
             chunk.write(patch)
diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py
--- a/mercurial/hgweb/protocol.py
+++ b/mercurial/hgweb/protocol.py
@@ -7,11 +7,15 @@ 
 
 from __future__ import absolute_import
 
-import cStringIO
 import cgi
 import urllib
 import zlib
 
+try:
+    import cStringIO as io
+except ImportError:
+    import io
+
 from .common import (
     HTTP_OK,
 )
@@ -66,7 +70,7 @@ 
             fp.write(s)
     def redirect(self):
         self.oldio = self.ui.fout, self.ui.ferr
-        self.ui.ferr = self.ui.fout = cStringIO.StringIO()
+        self.ui.ferr = self.ui.fout = io.StringIO()
     def restore(self):
         val = self.ui.fout.getvalue()
         self.ui.ferr, self.ui.fout = self.oldio
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -8,7 +8,6 @@ 
 
 from __future__ import absolute_import
 
-import cStringIO
 import collections
 import copy
 import email
@@ -20,6 +19,11 @@ 
 import tempfile
 import zlib
 
+try:
+    import cStringIO as io
+except ImportError:
+    import io
+
 from .i18n import _
 from .node import (
     hex,
@@ -60,7 +64,7 @@ 
         return len(l) == 2 and ' ' not in l[0]
 
     def chunk(lines):
-        return cStringIO.StringIO(''.join(lines))
+        return io.StringIO(''.join(lines))
 
     def hgsplit(stream, cur):
         inheader = True
@@ -93,7 +97,7 @@ 
 
     def mimesplit(stream, cur):
         def msgfp(m):
-            fp = cStringIO.StringIO()
+            fp = io.StringIO()
             g = email.Generator.Generator(fp, mangle_from_=False)
             g.flatten(m)
             fp.seek(0)
@@ -246,7 +250,7 @@ 
 
                 ui.debug('found patch at byte %d\n' % m.start(0))
                 diffs_seen += 1
-                cfp = cStringIO.StringIO()
+                cfp = io.StringIO()
                 for line in payload[:m.start(0)].splitlines():
                     if line.startswith('# HG changeset patch') and not hgpatch:
                         ui.debug('patch generated by hg export\n')
@@ -1057,7 +1061,7 @@ 
                         continue
                     # Remove comment lines
                     patchfp = open(patchfn)
-                    ncpatchfp = cStringIO.StringIO()
+                    ncpatchfp = io.StringIO()
                     for line in patchfp:
                         if not line.startswith('#'):
                             ncpatchfp.write(line)
@@ -1440,7 +1444,12 @@ 
     ...     hunkscomingfromfilterpatch.extend(h.hunks)
 
     >>> reversedhunks = reversehunks(hunkscomingfromfilterpatch)
-    >>> fp = cStringIO.StringIO()
+    >>> try:
+    ...     import cStringIO as io
+    ... except ImportError:
+    ...     import io
+
+    >>> fp = io.StringIO()
     >>> for c in reversedhunks:
     ...      c.write(fp)
     >>> fp.seek(0)
@@ -1553,7 +1562,7 @@ 
             }
 
     p = parser()
-    fp = cStringIO.StringIO()
+    fp = io.StringIO()
     fp.write(''.join(originalchunks))
     fp.seek(0)
 
@@ -1732,7 +1741,7 @@ 
         pos = lr.fp.tell()
         fp = lr.fp
     except IOError:
-        fp = cStringIO.StringIO(lr.fp.read())
+        fp = io.StringIO(lr.fp.read())
     gitlr = linereader(fp)
     gitlr.push(firstline)
     gitpatches = readgitpatch(gitlr)
diff --git a/mercurial/pure/mpatch.py b/mercurial/pure/mpatch.py
--- a/mercurial/pure/mpatch.py
+++ b/mercurial/pure/mpatch.py
@@ -7,10 +7,14 @@ 
 
 from __future__ import absolute_import
 
-import cStringIO
 import struct
 
-StringIO = cStringIO.StringIO
+try:
+    import cStringIO as io
+except ImportError:
+    import io
+
+StringIO = io.StringIO
 
 # This attempts to apply a series of patches in time proportional to
 # the total size of the patches, rather than patches * len(text). This
diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py
+++ b/mercurial/pure/parsers.py
@@ -7,10 +7,14 @@ 
 
 from __future__ import absolute_import
 
-import cStringIO
 import struct
 import zlib
 
+try:
+    import cStringIO as io
+except ImportError:
+    import io
+
 from .node import nullid
 
 _pack = struct.pack
@@ -90,7 +94,7 @@ 
 
 def pack_dirstate(dmap, copymap, pl, now):
     now = int(now)
-    cs = cStringIO.StringIO()
+    cs = io.StringIO()
     write = cs.write
     write("".join(pl))
     for f, e in dmap.iteritems():
diff --git a/mercurial/url.py b/mercurial/url.py
--- a/mercurial/url.py
+++ b/mercurial/url.py
@@ -10,13 +10,17 @@ 
 from __future__ import absolute_import
 
 import base64
-import cStringIO
 import httplib
 import os
 import socket
 import urllib
 import urllib2
 
+try:
+    import cStringIO as io
+except ImportError:
+    import io
+
 from .i18n import _
 from . import (
     error,
@@ -273,7 +277,7 @@ 
         res.length = None
         res.chunked = 0
         res.will_close = 1
-        res.msg = httplib.HTTPMessage(cStringIO.StringIO())
+        res.msg = httplib.HTTPMessage(io.StringIO())
         return False
 
     res.msg = httplib.HTTPMessage(res.fp)
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -123,153 +123,152 @@ 
   contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape' codec can't decode bytes in position *-*: malformed \N character escape (<unknown>, line *) (glob)
   contrib/import-checker.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
   doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
-  hgext/acl.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  hgext/acl.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob)
-  hgext/blackbox.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
+  hgext/blackbox.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob)
-  hgext/censor.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
+  hgext/censor.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob)
-  hgext/children.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/churn.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/clonebundles.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
+  hgext/children.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/churn.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/clonebundles.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob)
   hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
-  hgext/convert/convcmd.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/convert/cvs.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
+  hgext/convert/convcmd.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/convert/cvs.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
-  hgext/convert/darcs.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  hgext/convert/darcs.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob)
-  hgext/convert/git.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/convert/gnuarch.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/convert/hg.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
-  hgext/convert/monotone.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/convert/p*.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  hgext/convert/git.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/convert/gnuarch.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/convert/hg.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/convert/monotone.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/convert/p*.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
   hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob)
-  hgext/eol.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/extdiff.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/factotum.py: error importing: <ImportError> No module named 'cStringIO' (error at url.py:*) (glob)
+  hgext/eol.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/extdiff.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/factotum.py: error importing: <ImportError> No module named 'httplib' (error at url.py:*) (glob)
   hgext/fetch.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob)
-  hgext/fsmonitor/state.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/fsmonitor/watchmanclient.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/gpg.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/graphlog.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/hgcia.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/hgk.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/highlight/highlight.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  hgext/fsmonitor/state.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/fsmonitor/watchmanclient.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/gpg.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/graphlog.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/hgcia.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/hgk.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/highlight/highlight.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
-  hgext/keyword.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/largefiles/basestore.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/largefiles/lfcommands.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/largefiles/lfutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  hgext/keyword.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/largefiles/basestore.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/largefiles/lfcommands.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/largefiles/lfutil.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob)
-  hgext/largefiles/overrides.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  hgext/largefiles/overrides.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/largefiles/proto.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
   hgext/largefiles/remotestore.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
-  hgext/largefiles/reposetup.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  hgext/largefiles/reposetup.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob)
   hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob)
-  hgext/mq.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/notify.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/pager.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/patchbomb.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
-  hgext/purge.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/rebase.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  hgext/record.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/relink.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/schemes.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  hgext/share.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
+  hgext/mq.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/notify.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/pager.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/patchbomb.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/purge.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/rebase.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/record.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/relink.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/schemes.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  hgext/share.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
-  hgext/strip.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  hgext/strip.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob)
-  hgext/win*text.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  hgext/win*text.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
-  mercurial/bookmarks.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/branchmap.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  mercurial/bookmarks.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/branchmap.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
   mercurial/byterange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
-  mercurial/changegroup.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/changelog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
-  mercurial/cmdutil.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
+  mercurial/changegroup.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/changelog.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/cmdutil.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob)
-  mercurial/config.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/context.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/copies.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/crecord.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
-  mercurial/destutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/dirstate.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/discovery.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/dispatch.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
+  mercurial/config.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/context.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/copies.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/crecord.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/destutil.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/dirstate.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/discovery.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/dispatch.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   mercurial/exchange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
-  mercurial/extensions.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  mercurial/filelog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
-  mercurial/filemerge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/fileset.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  mercurial/extensions.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/filelog.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/filemerge.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/fileset.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
-  mercurial/graphmod.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/help.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  mercurial/hg.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  mercurial/graphmod.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/help.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
+  mercurial/hg.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob)
   mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
   mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
-  mercurial/hgweb/protocol.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
+  mercurial/hgweb/protocol.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
   mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
   mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob)
   mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
   mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
   mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
-  mercurial/hook.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
+  mercurial/hook.py: error importing: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (error at i18n.py:*) (glob)
   mercurial/httpclient/_readers.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
   mercurial/httpconnection.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
   mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
   mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
-  mercurial/localrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/lock.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/mail.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/manifest.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
-  mercurial/match.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/mdiff.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
-  mercurial/merge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/minirst.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/namespaces.py: error importing: <ImportError> No module named 'cStringIO' (error at patch.py:*) (glob)
-  mercurial/obsolete.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/patch.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
-  mercurial/pathutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/peer.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/pure/mpatch.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
-  mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
-  mercurial/pushkey.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/pvec.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/registrar.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  mercurial/localrepo.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/lock.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/mail.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/manifest.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/match.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/mdiff.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/merge.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/minirst.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/namespaces.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/obsolete.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/patch.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/pathutil.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/peer.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'mercurial.pure.node' (line *) (glob)
+  mercurial/pushkey.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/pvec.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/registrar.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
   mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
-  mercurial/repoview.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/revlog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
-  mercurial/revset.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/scmutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  mercurial/repoview.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/revlog.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/revset.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/scmutil.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
   mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob)
-  mercurial/similar.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
-  mercurial/simplemerge.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
-  mercurial/sshpeer.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/sshserver.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  mercurial/sslutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
+  mercurial/similar.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/simplemerge.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/sshpeer.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/sshserver.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/sslutil.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
   mercurial/statichttprepo.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
-  mercurial/store.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/streamclone.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/subrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
-  mercurial/tagmerge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/tags.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/templatefilters.py: error importing: <ImportError> No module named 'cStringIO' (error at patch.py:*) (glob)
-  mercurial/templatekw.py: error importing: <ImportError> No module named 'cStringIO' (error at patch.py:*) (glob)
-  mercurial/templater.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/transaction.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/ui.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/unionrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
-  mercurial/url.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
-  mercurial/util.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
-  mercurial/verify.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
+  mercurial/store.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/streamclone.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/subrepo.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/tagmerge.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/tags.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/templatefilters.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/templatekw.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/templater.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/transaction.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/ui.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/unionrepo.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/url.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
+  mercurial/util.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
+  mercurial/verify.py: error importing module: <AttributeError> 'NullTranslations' object has no attribute 'ugettext' (line *) (glob)
   mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob)
   mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob)
   mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
@@ -302,5 +301,4 @@ 
   tests/test-ui-verbosity.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
   tests/test-walkrepo.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   tests/test-wireproto.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
-
 #endif