bdiff: drop duplicate definition of splitnewlines()
It was added in
29dd37a418aa (bdiff: write a native version of
splitnewlines, 2018-01-25).
Differential Revision: https://phab.mercurial-scm.org/D5618
--- a/mercurial/pure/bdiff.py Wed Jan 16 21:54:16 2019 -0500
+++ b/mercurial/pure/bdiff.py Wed Jan 16 16:55:52 2019 -0800
@@ -90,13 +90,3 @@
text = re.sub('[ \t\r]+', ' ', text)
text = text.replace(' \n', '\n')
return text
-
-def splitnewlines(text):
- '''like str.splitlines, but only split on newlines.'''
- lines = [l + '\n' for l in text.split('\n')]
- if lines:
- if lines[-1] == '\n':
- lines.pop()
- else:
- lines[-1] = lines[-1][:-1]
- return lines