~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import os
18
18
 
19
19
from bzrlib.errors import BzrCommandError, NoSuchRevision
20
 
from bzrlib.tests import TestCaseInTempDir
 
20
from bzrlib.tests import TestCaseWithTransport
21
21
from bzrlib.revisionspec import RevisionSpec
22
22
from bzrlib.workingtree import WorkingTree
23
23
 
24
 
class TestRevisionInfo(TestCaseInTempDir):
 
24
 
 
25
class TestRevisionInfo(TestCaseWithTransport):
25
26
    
26
27
    def check_error(self, output, *args):
27
28
        """Verify that the expected error matches what bzr says.
40
41
        self.assertEquals(self.run_bzr_captured(args)[0], output)
41
42
 
42
43
    def test_revision_info(self):
43
 
        """Test that 'bzr revision-info' reports the correct thing.
44
 
        """
45
 
 
46
 
        wt = WorkingTree.create_standalone('.')
47
 
        b = wt.branch
 
44
        """Test that 'bzr revision-info' reports the correct thing."""
 
45
        wt = self.make_branch_and_tree('.')
48
46
 
49
47
        wt.commit('Commit one', rev_id='a@r-0-1')
50
48
        wt.commit('Commit two', rev_id='a@r-0-2')
87
85
    def test_cat_revision(self):
88
86
        """Test bzr cat-revision.
89
87
        """
90
 
        wt = WorkingTree.create_standalone('.')
91
 
        b = wt.branch
 
88
        wt = self.make_branch_and_tree('.')
 
89
        r = wt.branch.repository
92
90
 
93
91
        wt.commit('Commit one', rev_id='a@r-0-1')
94
92
        wt.commit('Commit two', rev_id='a@r-0-2')
95
93
        wt.commit('Commit three', rev_id='a@r-0-3')
96
94
 
97
95
        revs = {
98
 
            1:b.repository.get_revision_xml('a@r-0-1'),
99
 
            2:b.repository.get_revision_xml('a@r-0-2'),
100
 
            3:b.repository.get_revision_xml('a@r-0-3'),
 
96
            1:r.get_revision_xml('a@r-0-1'),
 
97
            2:r.get_revision_xml('a@r-0-2'),
 
98
            3:r.get_revision_xml('a@r-0-3'),
101
99
        }
102
100
 
103
101
        self.check_output(revs[1], 'cat-revision', 'a@r-0-1')