~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-05-29 23:15:16 UTC
  • mfrom: (1711.2.25 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060529231516-cad98b5042ea75f3
(jam) Updates to PatienceDiff for performance, and other cleanups.

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 SequenceMatcher, 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 = SequenceMatcher
 
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',