~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge3.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-05-23 14:14:55 UTC
  • mfrom: (1185.81.29 bzr.patience)
  • Revision ID: pqm@pqm.ubuntu.com-20060523141455-306c645e0da6d13d
Use Patience sequence matcher for diff and merge3

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
# s: "i hate that."
20
20
 
21
21
 
22
 
from difflib import SequenceMatcher
23
 
 
24
22
from bzrlib.errors import CantReprocessAndShowBase
 
23
from bzrlib.patiencediff import SequenceMatcher
25
24
from bzrlib.textfile import check_text_lines
26
25
 
27
26
def intersect(ra, rb):
384
383
 
385
384
    def find_unconflicted(self):
386
385
        """Return a list of ranges in base that are not conflicted."""
387
 
 
388
 
        import re
389
 
 
390
 
        # don't sync-up on lines containing only blanks or pounds
391
 
        junk_re = re.compile(r'^[ \t#]*$')
392
 
        
393
 
        am = SequenceMatcher(junk_re.match, self.base, self.a).get_matching_blocks()
394
 
        bm = SequenceMatcher(junk_re.match, self.base, self.b).get_matching_blocks()
 
386
        am = SequenceMatcher(None, self.base, self.a).get_matching_blocks()
 
387
        bm = SequenceMatcher(None, self.base, self.b).get_matching_blocks()
395
388
 
396
389
        unc = []
397
390