comparison mercurial/mdiff.py @ 3877:abaee83ce0a6

Replace demandload with new demandimport
author Matt Mackall <mpm@selenic.com>
date Wed, 13 Dec 2006 13:27:09 -0600
parents 096f1c73cdc3
children 226df1808f16
comparison
equal deleted inserted replaced
3876:1e0b94cfba0e 3877:abaee83ce0a6
3 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> 3 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
4 # 4 #
5 # This software may be used and distributed according to the terms 5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference. 6 # of the GNU General Public License, incorporated herein by reference.
7 7
8 from demandload import demandload 8 import bdiff, mpatch, re, struct, util
9 import bdiff, mpatch
10 demandload(globals(), "re struct util")
11 9
12 def splitnewlines(text): 10 def splitnewlines(text):
13 '''like str.splitlines, but only split on newlines.''' 11 '''like str.splitlines, but only split on newlines.'''
14 lines = [l + '\n' for l in text.split('\n')] 12 lines = [l + '\n' for l in text.split('\n')]
15 if lines: 13 if lines: