~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/patiencediff.py

Rename cdv => patience

Show diffs side-by-side

added added

removed removed

Lines of Context:
381
381
    import optparse
382
382
    p = optparse.OptionParser(usage='%prog [options] file_a file_b'
383
383
                                    '\nFiles can be "-" to read from stdin')
384
 
    p.add_option('--cdv', dest='matcher', action='store_const', const='cdv',
385
 
                 default='cdv', help='Use the cdv difference algorithm')
 
384
    p.add_option('--patience', dest='matcher', action='store_const', const='patience',
 
385
                 default='patience', help='Use the patience difference algorithm')
386
386
    p.add_option('--difflib', dest='matcher', action='store_const', const='difflib',
387
 
                 default='cdv', help='Use python\'s difflib algorithm')
 
387
                 default='patience', help='Use python\'s difflib algorithm')
388
388
 
389
 
    algorithms = {'cdv':SequenceMatcher, 'difflib':difflib.SequenceMatcher}
 
389
    algorithms = {'patience':SequenceMatcher, 'difflib':difflib.SequenceMatcher}
390
390
 
391
391
    (opts, args) = p.parse_args(args)
392
392
    matcher = algorithms[opts.matcher]