mercurial/archival.py
changeset 28861 86db5cb55d46
parent 28017 d3f1b7ee5e70
child 29890 31a6d5e14508
--- 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):