diff -r 50d11dd8ac02 -r 86db5cb55d46 mercurial/hgweb/protocol.py --- a/mercurial/hgweb/protocol.py Sun Apr 10 21:32:08 2016 +0000 +++ b/mercurial/hgweb/protocol.py Sun Apr 10 20:55:37 2016 +0000 @@ -7,7 +7,6 @@ from __future__ import absolute_import -import cStringIO import cgi import urllib import zlib @@ -20,6 +19,7 @@ util, wireproto, ) +stringio = util.stringio HGTYPE = 'application/mercurial-0.1' HGERRTYPE = 'application/hg-error' @@ -66,7 +66,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 = stringio() def restore(self): val = self.ui.fout.getvalue() self.ui.ferr, self.ui.fout = self.oldio