~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/grep/cmds.py

  • Committer: Jelmer Vernooij
  • Date: 2012-08-02 10:38:21 UTC
  • mto: This revision was merged to the branch mainline in revision 6555.
  • Revision ID: jelmer@samba.org-20120802103821-pto2dgacjtmpzl1n
Move color feature into bzrlib.tests.features.

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
            path_list=None, revision=None, pattern=None, include=None,
148
148
            exclude=None, fixed_string=False, files_with_matches=False,
149
149
            files_without_match=False, color=None, diff=False):
 
150
        from bzrlib import termcolor
150
151
        from bzrlib.plugins.grep import (
151
152
            grep,
152
 
            termcolor,
153
153
            )
154
154
        import re
155
 
        if path_list == None:
 
155
        if path_list is None:
156
156
            path_list = ['.']
157
157
        else:
158
158
            if from_root:
236
236
        GrepOptions.outf = self.outf
237
237
        GrepOptions.show_color = show_color
238
238
 
239
 
        if diff == True:
 
239
        if diff:
240
240
            # options not used:
241
241
            # files_with_matches, files_without_match
242
242
            # levels(?), line_number, from_root
243
243
            # include, exclude
244
244
            # These are silently ignored.
245
245
            grep.grep_diff(GrepOptions)
246
 
        elif revision == None:
 
246
        elif revision is None:
247
247
            grep.workingtree_grep(GrepOptions)
248
248
        else:
249
249
            grep.versioned_grep(GrepOptions)