Changeset - e8650fbc4d4e
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2012-07-06 00:01:09
marcin@python-works.com
Moved BytesIO into compat because of py25 compatibility issue
2 files changed with 12 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/compat.py
Show inline comments
 
@@ -394,3 +394,13 @@ except ImportError:
 
            result = [x + [y] for x in result for y in pool]
 
        for prod in result:
 
            yield tuple(prod)
 

	
 

	
 
#==============================================================================
 
# BytesIO
 
#==============================================================================
 

	
 
try:
 
    from io import BytesIO
 
except ImportError:
 
    from cStringIO import StringIO as BytesIO
rhodecode/lib/diffs.py
Show inline comments
 
@@ -26,7 +26,6 @@
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
import re
 
import io
 
import difflib
 
import markupsafe
 

	
 
@@ -39,6 +38,7 @@ from mercurial import localrepo
 

	
 
from pylons.i18n.translation import _
 

	
 
from rhodecode.lib.compat import BytesIO
 
from rhodecode.lib.vcs.exceptions import VCSError
 
from rhodecode.lib.vcs.nodes import FileNode, SubModuleNode
 
from rhodecode.lib.helpers import escape
 
@@ -603,7 +603,7 @@ def differ(org_repo, org_ref, other_repo
 
            unbundle = other_repo.getbundle('incoming', common=common,
 
                                            heads=rheads)
 

	
 
            buf = io.BytesIO()
 
            buf = BytesIO()
 
            while True:
 
                chunk = unbundle._stream.read(1024 * 4)
 
                if not chunk:
0 comments (0 inline, 0 general)