~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Basic BzrDir support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from tempfile import TemporaryFile
30
30
import codecs
31
31
 
 
32
from bzrlib.clone import copy_branch
32
33
from bzrlib.branch import Branch
33
34
from bzrlib.builtins import merge
34
35
from bzrlib.revisionspec import RevisionSpec
35
36
from bzrlib.status import show_status
36
 
from bzrlib.tests import TestCaseWithTransport
 
37
from bzrlib.tests import TestCaseInTempDir
37
38
from bzrlib.workingtree import WorkingTree
38
39
 
39
40
 
40
 
class BranchStatus(TestCaseWithTransport):
 
41
class BranchStatus(TestCaseInTempDir):
41
42
    
42
43
    def test_branch_status(self): 
43
44
        """Test basic branch status"""
44
 
        wt = self.make_branch_and_tree('.')
 
45
        wt = WorkingTree.create_standalone('.')
45
46
        b = wt.branch
46
47
 
47
48
        # status with nothing
64
65
 
65
66
    def test_branch_status_revisions(self):
66
67
        """Tests branch status with revisions"""
67
 
        wt = self.make_branch_and_tree('.')
 
68
        wt = WorkingTree.create_standalone('.')
68
69
        b = wt.branch
69
70
 
70
71
        tof = StringIO()
111
112
    def test_pending(self):
112
113
        """Pending merges display works, including Unicode"""
113
114
        mkdir("./branch")
114
 
        wt = self.make_branch_and_tree('branch')
 
115
        wt = WorkingTree.create_standalone('branch')
115
116
        b = wt.branch
116
117
        wt.commit("Empty commit 1")
117
 
        b_2_dir = b.bzrdir.sprout('./copy')
118
 
        b_2 = b_2_dir.open_branch()
119
 
        wt2 = b_2_dir.open_workingtree()
 
118
        b_2 = b.clone('./copy')
 
119
        wt2 = WorkingTree('copy', b_2)
120
120
        wt.commit(u"\N{TIBETAN DIGIT TWO} Empty commit 2")
121
121
        merge(["./branch", -1], [None, None], this_dir = './copy')
122
122
        message = self.status_string(b_2)
134
134
 
135
135
    def test_branch_status_specific_files(self): 
136
136
        """Tests branch status with given specific files"""
137
 
        wt = self.make_branch_and_tree('.')
 
137
        wt = WorkingTree.create_standalone('.')
138
138
        b = wt.branch
139
139
 
140
140
        self.build_tree(['directory/','directory/hello.c', 'bye.c','test.c','dir2/'])