~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to hunk_selector.py

  • Committer: Aaron Bentley
  • Date: 2012-01-20 02:07:15 UTC
  • Revision ID: aaron@aaronbentley.com-20120120020715-ar6jbqnrjcuebggz
Tags: release-2.5
Update for 2.5 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import sys
2
2
 
3
3
from userinteractor import UserInteractor, UserOption
4
 
from errors import NoColor
 
4
from errors import NoColor, NoBzrtoolsColor
5
5
import copy
6
6
 
7
7
class HunkSelector:
13
13
                from colordiff import DiffWriter
14
14
                from terminal import has_ansi_colors
15
15
                if has_ansi_colors():
16
 
                    self.diff_stream = DiffWriter(sys.stdout)
 
16
                    self.diff_stream = DiffWriter(sys.stdout,
 
17
                                                  check_style=False)
17
18
                else:
18
19
                    if color is True:
19
20
                        raise NoColor()
24
25
                self.diff_stream = sys.stdout
25
26
        else:
26
27
            self.diff_stream = sys.stdout
27
 
            
 
28
 
28
29
        self.standard_options = [
29
30
            UserOption('y', self._selected, self.strings['select_desc'],
30
31
                default=True),