From 520f944b25e2bef12a4dfdef73a793d1f6469987 Mon Sep 17 00:00:00 2001 From: Siddharth Agarwal Date: Mon, 13 Apr 2015 08:03:57 -0700 Subject: [PATCH] git_handler: move cStringIO to a global import There are a couple of places that use StringIO for the added features it has over cStringIO, so we can't replace all its uses wholesale. --- hggit/git_handler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hggit/git_handler.py b/hggit/git_handler.py index 0102f6c7d8..a1d900233e 100644 --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -1,5 +1,5 @@ import collections, itertools, os, math, urllib, urllib2, re -import stat, posixpath, StringIO +import cStringIO, stat, posixpath, StringIO from dulwich.errors import HangupException, GitProtocolError, UpdateRefsError from dulwich.objects import Blob, Commit, Tag, Tree, parse_timezone, S_IFGITLINK @@ -190,7 +190,6 @@ class GitHandler(object): map_hg = self._map_hg hgshas = map_hg.keys() hgshas.sort() - import cStringIO buf = cStringIO.StringIO() bwrite = buf.write for hgsha in hgshas: