/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: Aaron Bentley
  • Date: 2007-08-15 16:05:13 UTC
  • mfrom: (2703 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2709.
  • Revision ID: abentley@panoramicfeedback.com-20070815160513-aepyrd0uu9vtedsy
Merge bzr.dev

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'):