##// END OF EJS Templates
Moved BytesIO into compat because of py25 compatibility issue
marcink -
r2552:e8650fbc beta
parent child Browse files
Show More
@@ -394,3 +394,13 b' except ImportError:'
394 result = [x + [y] for x in result for y in pool]
394 result = [x + [y] for x in result for y in pool]
395 for prod in result:
395 for prod in result:
396 yield tuple(prod)
396 yield tuple(prod)
397
398
399 #==============================================================================
400 # BytesIO
401 #==============================================================================
402
403 try:
404 from io import BytesIO
405 except ImportError:
406 from cStringIO import StringIO as BytesIO
@@ -26,7 +26,6 b''
26 # along with this program. If not, see <http://www.gnu.org/licenses/>.
26 # along with this program. If not, see <http://www.gnu.org/licenses/>.
27
27
28 import re
28 import re
29 import io
30 import difflib
29 import difflib
31 import markupsafe
30 import markupsafe
32
31
@@ -39,6 +38,7 b' from mercurial import localrepo'
39
38
40 from pylons.i18n.translation import _
39 from pylons.i18n.translation import _
41
40
41 from rhodecode.lib.compat import BytesIO
42 from rhodecode.lib.vcs.exceptions import VCSError
42 from rhodecode.lib.vcs.exceptions import VCSError
43 from rhodecode.lib.vcs.nodes import FileNode, SubModuleNode
43 from rhodecode.lib.vcs.nodes import FileNode, SubModuleNode
44 from rhodecode.lib.helpers import escape
44 from rhodecode.lib.helpers import escape
@@ -603,7 +603,7 b' def differ(org_repo, org_ref, other_repo'
603 unbundle = other_repo.getbundle('incoming', common=common,
603 unbundle = other_repo.getbundle('incoming', common=common,
604 heads=rheads)
604 heads=rheads)
605
605
606 buf = io.BytesIO()
606 buf = BytesIO()
607 while True:
607 while True:
608 chunk = unbundle._stream.read(1024 * 4)
608 chunk = unbundle._stream.read(1024 * 4)
609 if not chunk:
609 if not chunk:
General Comments 0
You need to be logged in to leave comments. Login now