~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-12 09:05:11 UTC
  • mfrom: (4948.4.1 cat-objectnotlocked)
  • Revision ID: pqm@pqm.ubuntu.com-20100112090511-hcet612qmzmxnqey
(andrew) Fix ObjectNotLocked error in 'bzr cat -rbranch:... FILE'.
        (#506274)

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'])