/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_cat.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
 
"""Black-box tests for bzr cat.
 
18
"""Black-box tests for brz cat.
19
19
"""
20
20
 
21
 
from bzrlib import tests
22
 
from bzrlib.tests.matchers import ContainsNoVfsCalls
23
 
from bzrlib.transport import memory
 
21
from ... import tests
 
22
from ..matchers import ContainsNoVfsCalls
 
23
from ...transport import memory
24
24
 
25
25
 
26
26
class TestCat(tests.TestCaseWithTransport):
29
29
        tree = self.make_branch_and_tree('branch')
30
30
        self.build_tree_contents([('branch/a', 'foo\n')])
31
31
        tree.add('a')
32
 
        # 'bzr cat' without an option should cat the last revision
 
32
        # 'brz cat' without an option should cat the last revision
33
33
        self.run_bzr(['cat', 'a'], retcode=3, working_dir='branch')
34
34
 
35
35
        tree.commit(message='1')
93
93
            self.build_tree_contents([('e-rev', 'new\n')])
94
94
            tree.add(['e-rev'])
95
95
        finally:
96
 
            # calling bzr as another process require free lock on win32
 
96
            # calling brz as another process require free lock on win32
97
97
            tree.unlock()
98
98
 
99
99
        # 'b-tree' is not present in the old tree.
100
 
        self.run_bzr_error(["^bzr: ERROR: u?'b-tree' "
 
100
        self.run_bzr_error(["^brz: ERROR: u?'b-tree' "
101
101
                            "is not present in revision .+$"],
102
102
                           'cat b-tree --name-from-revision')
103
103
 
161
161
        # subprocess because we really need to patch in a plugin that
162
162
        # registers the filters. Instead, we patch in a custom
163
163
        # filter_stack and use run_bzr() ...
164
 
        from cStringIO import StringIO
165
 
        from bzrlib.commands import run_bzr
166
 
        from bzrlib.tests.test_filters import _stack_2
167
 
        from bzrlib.trace import mutter
168
 
        from bzrlib.tree import Tree
 
164
        from ..test_filters import _stack_2
 
165
        from ...tree import Tree
169
166
        wt = self.make_branch_and_tree('.')
170
167
        self.build_tree_contents([
171
168
            ('README', "junk\nline 1 of README\nline 2 of README\n"),
198
195
 
199
196
    def test_cat_nonexistent_branch(self):
200
197
        self.vfs_transport_factory = memory.MemoryServer
201
 
        self.run_bzr_error(['^bzr: ERROR: Not a branch'],
 
198
        self.run_bzr_error(['^brz: ERROR: Not a branch'],
202
199
                           ['cat', self.get_url()])
203
200
 
204
201
    def test_cat_directory(self):