/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 grep.py

  • Committer: Martin
  • Date: 2010-06-02 17:44:14 UTC
  • mto: (0.40.137 grep)
  • mto: This revision was merged to the branch mainline in revision 6555.
  • Revision ID: gzlist@googlemail.com-20100602174414-1bm1ow527ab4sw47
Remove probably bogus line decode calls prior to formatting

Show diffs side-by-side

added added

removed removed

Lines of Context:
478
478
            found_str = color_string(pattern, FG.BOLD_RED)
479
479
            for index, line in enumerate(file_text.splitlines()):
480
480
                if pattern in line:
481
 
                    line = line.decode(_te, 'replace')
482
481
                    if opts.show_color:
483
482
                        line = line.replace(pattern, found_str)
484
483
                    res_append(writeline(path=path, revno=revno,
486
485
        else:
487
486
            for index, line in enumerate(file_text.splitlines()):
488
487
                if patternc.search(line):
489
 
                    line = line.decode(_te, 'replace')
490
488
                    if opts.show_color:
491
489
                        line = re_color_string(opts.sub_patternc, line, FG.BOLD_RED)
492
490
                    res_append(writeline(path=path, revno=revno,
496
494
            found_str = color_string(pattern, FG.BOLD_RED)
497
495
            for line in file_text.splitlines():
498
496
                if pattern in line:
499
 
                    line = line.decode(_te, 'replace')
500
497
                    if opts.show_color:
501
498
                        line = line.replace(pattern, found_str)
502
499
                    res_append(writeline(path=path, revno=revno, line=line))
503
500
        else:
504
501
            for line in file_text.splitlines():
505
502
                if patternc.search(line):
506
 
                    line = line.decode(_te, 'replace')
507
503
                    if opts.show_color:
508
504
                        line = re_color_string(opts.sub_patternc, line, FG.BOLD_RED)
509
505
                    res_append(writeline(path=path, revno=revno, line=line))