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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2017-06-07 18:37:11 UTC
  • mfrom: (6667.2.1 trunk)
  • Revision ID: breezy.the.bot@gmail.com-20170607183711-oz0x9xqqh9x8jgas
Use ControlDir rather than BzrDir, remove unused imports.

Merged from https://code.launchpad.net/~jelmer/brz/small-fixes/+merge/325196

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
lazy_import(globals(), """
24
24
from fnmatch import fnmatch
25
25
 
26
 
from breezy._termcolor import color_string, re_color_string, FG
 
26
from breezy._termcolor import color_string, FG
27
27
 
28
28
from breezy.revisionspec import (
29
29
    RevisionSpec,
31
31
    RevisionSpec_revno,
32
32
    )
33
33
from breezy import (
34
 
    bzrdir,
 
34
    controldir,
35
35
    diff,
36
36
    errors,
37
37
    lazy_regex,
215
215
 
216
216
def grep_diff(opts):
217
217
    wt, branch, relpath = \
218
 
        bzrdir.BzrDir.open_containing_tree_or_branch('.')
 
218
        controldir.ControlDir.open_containing_tree_or_branch('.')
219
219
    branch.lock_read()
220
220
    try:
221
221
        if opts.revision:
307
307
 
308
308
def versioned_grep(opts):
309
309
    wt, branch, relpath = \
310
 
        bzrdir.BzrDir.open_containing_tree_or_branch('.')
 
310
        controldir.ControlDir.open_containing_tree_or_branch('.')
311
311
    branch.lock_read()
312
312
    try:
313
313
        start_rev = opts.revision[0]
379
379
    revno = opts.print_revno = None # for working tree set revno to None
380
380
 
381
381
    tree, branch, relpath = \
382
 
        bzrdir.BzrDir.open_containing_tree_or_branch('.')
 
382
        controldir.ControlDir.open_containing_tree_or_branch('.')
383
383
    if not tree:
384
384
        msg = ('Cannot search working tree. Working tree not found.\n'
385
385
            'To search for specific revision in history use the -r option.')