~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-01-12 07:02:54 UTC
  • mto: This revision was merged to the branch mainline in revision 4953.
  • Revision ID: andrew.bennetts@canonical.com-20100112070254-b4ilcyls7j9fo2k5
Fix ObjectNotLocked error in cmd_cat (and also release locks slightly sooner).

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
"""
21
21
 
22
22
import os
23
 
import sys
24
23
 
25
24
from bzrlib import tests
26
25
 
128
127
        out, err = self.run_bzr_subprocess(['cat', url])
129
128
        self.assertEqual('contents of README\n', out)
130
129
 
 
130
    def test_cat_branch_revspec(self):
 
131
        wt = self.make_branch_and_tree('a')
 
132
        self.build_tree(['a/README'])
 
133
        wt.add('README')
 
134
        wt.commit('Making sure there is a basis_tree available')
 
135
        wt = self.make_branch_and_tree('b')
 
136
        os.chdir('b')
 
137
 
 
138
        out, err = self.run_bzr_subprocess(
 
139
            ['cat', '-r', 'branch:../a', 'README'])
 
140
        self.assertEqual('contents of a/README\n', out)
 
141
 
131
142
    def test_cat_filters(self):
132
143
        wt = self.make_branch_and_tree('.')
133
144
        self.build_tree(['README'])