Mercurial > hg
diff mercurial/pure/parsers.py @ 28861:86db5cb55d46
pycompat: switch to util.stringio for py3 compat
author | timeless <timeless@mozdev.org> |
---|---|
date | Sun, 10 Apr 2016 20:55:37 +0000 |
parents | 6ab8c6511a6a |
children | 255274719dc1 |
line wrap: on
line diff
--- a/mercurial/pure/parsers.py Sun Apr 10 21:32:08 2016 +0000 +++ b/mercurial/pure/parsers.py Sun Apr 10 20:55:37 2016 +0000 @@ -7,11 +7,12 @@ from __future__ import absolute_import -import cStringIO import struct import zlib from .node import nullid +from . import pycompat +stringio = pycompat.stringio _pack = struct.pack _unpack = struct.unpack @@ -90,7 +91,7 @@ def pack_dirstate(dmap, copymap, pl, now): now = int(now) - cs = cStringIO.StringIO() + cs = stringio() write = cs.write write("".join(pl)) for f, e in dmap.iteritems():