~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weave.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:
70
70
 
71
71
from copy import copy
72
72
from cStringIO import StringIO
73
 
from difflib import SequenceMatcher
74
73
import os
75
74
import sha
76
75
import time
84
83
        )
85
84
import bzrlib.errors as errors
86
85
from bzrlib.osutils import sha_strings
87
 
from bzrlib.patiencediff import SequenceMatcher, unified_diff
 
86
import bzrlib.patiencediff
88
87
from bzrlib.symbol_versioning import *
89
88
from bzrlib.tsort import topo_sort
90
89
from bzrlib.versionedfile import VersionedFile, InterVersionedFile
192
191
        self._name_map = {}
193
192
        self._weave_name = weave_name
194
193
        if matcher is None:
195
 
            self._matcher = SequenceMatcher
 
194
            self._matcher = bzrlib.patiencediff.PatienceSequenceMatcher
196
195
        else:
197
196
            self._matcher = matcher
198
197
 
1366
1365
        v1, v2 = map(int, argv[3:5])
1367
1366
        lines1 = w.get(v1)
1368
1367
        lines2 = w.get(v2)
1369
 
        diff_gen = unified_diff(lines1, lines2,
 
1368
        diff_gen = bzrlib.patiencediff.unified_diff(lines1, lines2,
1370
1369
                                '%s version %d' % (fn, v1),
1371
1370
                                '%s version %d' % (fn, v2))
1372
1371
        sys.stdout.writelines(diff_gen)