Mercurial > hg
comparison mercurial/mdiff.py @ 2470:fe1689273f84
use demandload more.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Tue, 20 Jun 2006 23:58:21 -0700 |
parents | 35fb62a3a673 |
children | a20a1bb0c396 |
comparison
equal
deleted
inserted
replaced
2459:5c5277f03887 | 2470:fe1689273f84 |
---|---|
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 from demandload import demandload |
9 import struct, bdiff, util, mpatch | 9 import bdiff, mpatch |
10 demandload(globals(), "re") | 10 demandload(globals(), "re struct util") |
11 | 11 |
12 def splitnewlines(text): | 12 def splitnewlines(text): |
13 '''like str.splitlines, but only split on newlines.''' | 13 '''like str.splitlines, but only split on newlines.''' |
14 lines = [l + '\n' for l in text.split('\n')] | 14 lines = [l + '\n' for l in text.split('\n')] |
15 if lines: | 15 if lines: |