/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-15 01:08:19 UTC
  • mfrom: (2520.4.154 bzr.mpbundle)
  • Revision ID: pqm@pqm.ubuntu.com-20070815010819-0q50hsyvbvu1qs3k
Speed up installing revisions from Bundle 4

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
 
17
import difflib
17
18
import os
18
19
import re
19
20
import sys
48
49
# invoke callbacks on an object.  That object can either accumulate a
49
50
# list, write them out directly, etc etc.
50
51
 
 
52
 
 
53
class _PrematchedMatcher(difflib.SequenceMatcher):
 
54
    """Allow SequenceMatcher operations to use predetermined blocks"""
 
55
 
 
56
    def __init__(self, matching_blocks):
 
57
        difflib.SequenceMatcher(self, None, None)
 
58
        self.matching_blocks = matching_blocks
 
59
        self.opcodes = None
 
60
 
 
61
 
51
62
def internal_diff(old_filename, oldlines, new_filename, newlines, to_file,
52
63
                  allow_binary=False, sequence_matcher=None,
53
64
                  path_encoding='utf8'):