~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: John Arbash Meinel
  • Date: 2008-12-11 02:18:59 UTC
  • mto: This revision was merged to the branch mainline in revision 3895.
  • Revision ID: john@arbash-meinel.com-20081211021859-3ds8cwdqiq387t83
A Pyrex extension is about 5x faster than the fastest python code I could write.

Seems worth having after all.

Show diffs side-by-side

added added

removed removed

Lines of Context:
854
854
    return split_lines(''.join(chunks))
855
855
 
856
856
 
 
857
try:
 
858
    from bzrlib._chunks_to_lines_pyx import chunks_to_lines
 
859
except ImportError:
 
860
    pass
 
861
 
 
862
 
857
863
def split_lines(s):
858
864
    """Split s into lines, but without removing the newline characters."""
859
865
    lines = s.split('\n')