~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

Late bind to PatienceSequenceMatcher to allow plugin to override.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from bzrlib.delta import compare_trees
18
18
from bzrlib.errors import BzrError
19
19
import bzrlib.errors as errors
20
 
from bzrlib.patiencediff import PatienceSequenceMatcher, unified_diff
 
20
from bzrlib.patiencediff import unified_diff
 
21
import bzrlib.patiencediff
21
22
from bzrlib.symbol_versioning import *
22
23
from bzrlib.textfile import check_text_lines
23
24
from bzrlib.trace import mutter
24
25
 
 
26
 
25
27
# TODO: Rather than building a changeset object, we should probably
26
28
# invoke callbacks on an object.  That object can either accumulate a
27
29
# list, write them out directly, etc etc.
49
51
        check_text_lines(newlines)
50
52
 
51
53
    if sequence_matcher is None:
52
 
        sequence_matcher = PatienceSequenceMatcher
 
54
        sequence_matcher = bzrlib.patiencediff.PatienceSequenceMatcher
53
55
    ud = unified_diff(oldlines, newlines,
54
56
                      fromfile=old_filename+'\t', 
55
57
                      tofile=new_filename+'\t',