Mercurial > hg-stable
diff mercurial/archival.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 | d3f1b7ee5e70 |
children | 31a6d5e14508 |
line wrap: on
line diff
--- a/mercurial/archival.py Sun Apr 10 21:32:08 2016 +0000 +++ b/mercurial/archival.py Sun Apr 10 20:55:37 2016 +0000 @@ -7,7 +7,6 @@ from __future__ import absolute_import -import cStringIO import gzip import os import struct @@ -26,6 +25,7 @@ scmutil, util, ) +stringio = util.stringio # from unzip source code: _UNX_IFREG = 0x8000 @@ -172,7 +172,7 @@ i.size = 0 else: i.mode = mode - data = cStringIO.StringIO(data) + data = stringio(data) self.z.addfile(i, data) def done(self):