~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Move working tree initialisation out from  Branch.initialize, deprecated Branch.initialize to Branch.create.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
import os
 
18
 
 
19
from bzrlib.errors import BzrCommandError, NoSuchRevision
18
20
from bzrlib.tests import TestCaseInTempDir
19
 
from bzrlib.errors import BzrCommandError, NoSuchRevision
20
 
from bzrlib.branch import Branch
21
21
from bzrlib.revisionspec import RevisionSpec
 
22
from bzrlib.workingtree import WorkingTree
22
23
 
23
24
class TestRevisionInfo(TestCaseInTempDir):
24
25
    
42
43
        """Test that 'bzr revision-info' reports the correct thing.
43
44
        """
44
45
 
45
 
        b = Branch.initialize(u'.')
 
46
        wt = WorkingTree.create_standalone('.')
 
47
        b = wt.branch
46
48
 
47
 
        b.working_tree().commit('Commit one', rev_id='a@r-0-1')
48
 
        b.working_tree().commit('Commit two', rev_id='a@r-0-2')
49
 
        b.working_tree().commit('Commit three', rev_id='a@r-0-3')
 
49
        wt.commit('Commit one', rev_id='a@r-0-1')
 
50
        wt.commit('Commit two', rev_id='a@r-0-2')
 
51
        wt.commit('Commit three', rev_id='a@r-0-3')
50
52
 
51
53
        # Make sure revision-info without any arguments throws an exception
52
54
        self.check_error('bzr: ERROR: '
85
87
    def test_cat_revision(self):
86
88
        """Test bzr cat-revision.
87
89
        """
88
 
        b = Branch.initialize(u'.')
 
90
        wt = WorkingTree.create_standalone('.')
 
91
        b = wt.branch
89
92
 
90
 
        b.working_tree().commit('Commit one', rev_id='a@r-0-1')
91
 
        b.working_tree().commit('Commit two', rev_id='a@r-0-2')
92
 
        b.working_tree().commit('Commit three', rev_id='a@r-0-3')
 
93
        wt.commit('Commit one', rev_id='a@r-0-1')
 
94
        wt.commit('Commit two', rev_id='a@r-0-2')
 
95
        wt.commit('Commit three', rev_id='a@r-0-3')
93
96
 
94
97
        revs = {
95
98
            1:b.get_revision_xml('a@r-0-1'),