mercurial/pure/bdiff.py
changeset 27335 c4e3ff497f89
parent 15530 eeac5e179243
child 28389 9ab45fbe045e
equal deleted inserted replaced
27334:9007f697e8ef 27335:c4e3ff497f89
     3 # Copyright 2009 Matt Mackall <mpm@selenic.com> and others
     3 # Copyright 2009 Matt Mackall <mpm@selenic.com> and others
     4 #
     4 #
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2 or any later version.
     6 # GNU General Public License version 2 or any later version.
     7 
     7 
     8 import struct, difflib, re
     8 from __future__ import absolute_import
       
     9 
       
    10 import difflib
       
    11 import re
       
    12 import struct
     9 
    13 
    10 def splitnewlines(text):
    14 def splitnewlines(text):
    11     '''like str.splitlines, but only split on newlines.'''
    15     '''like str.splitlines, but only split on newlines.'''
    12     lines = [l + '\n' for l in text.split('\n')]
    16     lines = [l + '\n' for l in text.split('\n')]
    13     if lines:
    17     if lines: