~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
from bzrlib.builtins import merge
33
33
from bzrlib.revisionspec import RevisionSpec
34
34
from bzrlib.status import show_status
35
 
from bzrlib.tests import TestCaseInTempDir
 
35
from bzrlib.tests import TestCaseWithTransport
36
36
from bzrlib.workingtree import WorkingTree
37
37
 
38
38
 
39
 
class BranchStatus(TestCaseInTempDir):
 
39
class BranchStatus(TestCaseWithTransport):
40
40
    
41
41
    def test_branch_status(self): 
42
42
        """Test basic branch status"""
43
 
        wt = WorkingTree.create_standalone('.')
 
43
        wt = self.make_branch_and_tree('.')
44
44
        b = wt.branch
45
45
 
46
46
        # status with nothing
63
63
 
64
64
    def test_branch_status_revisions(self):
65
65
        """Tests branch status with revisions"""
66
 
        wt = WorkingTree.create_standalone('.')
 
66
        wt = self.make_branch_and_tree('.')
67
67
        b = wt.branch
68
68
 
69
69
        tof = StringIO()
110
110
    def test_pending(self):
111
111
        """Pending merges display works, including Unicode"""
112
112
        mkdir("./branch")
113
 
        wt = WorkingTree.create_standalone('branch')
 
113
        wt = self.make_branch_and_tree('branch')
114
114
        b = wt.branch
115
115
        wt.commit("Empty commit 1")
116
 
        b_2 = b.clone('./copy')
 
116
        b_2_dir = b.bzrdir.sprout('./copy')
 
117
        b_2 = b_2_dir.open_branch()
 
118
        wt2 = b_2_dir.open_workingtree()
117
119
        wt.commit(u"\N{TIBETAN DIGIT TWO} Empty commit 2")
118
120
        merge(["./branch", -1], [None, None], this_dir = './copy')
119
121
        message = self.status_string(b_2)
120
122
        self.assert_(message.startswith("pending merges:\n"))
121
123
        self.assert_(message.endswith("Empty commit 2\n")) 
122
 
        b_2.working_tree().commit("merged")
 
124
        wt2.commit("merged")
123
125
        # must be long to make sure we see elipsis at the end
124
 
        b.working_tree().commit("Empty commit 3 " + 
125
 
                                "blah blah blah blah " * 10)
 
126
        wt.commit("Empty commit 3 " + 
 
127
                   "blah blah blah blah " * 10)
126
128
        merge(["./branch", -1], [None, None], this_dir = './copy')
127
129
        message = self.status_string(b_2)
128
130
        self.assert_(message.startswith("pending merges:\n"))
131
133
 
132
134
    def test_branch_status_specific_files(self): 
133
135
        """Tests branch status with given specific files"""
134
 
        wt = WorkingTree.create_standalone('.')
 
136
        wt = self.make_branch_and_tree('.')
135
137
        b = wt.branch
136
138
 
137
139
        self.build_tree(['directory/','directory/hello.c', 'bye.c','test.c','dir2/'])
173
175
                           ])
174
176
 
175
177
 
176
 
class TestStatus(TestCaseInTempDir):
 
178
class TestStatus(TestCaseWithTransport):
177
179
 
178
180
    def test_status(self):
179
181
        self.run_bzr("init")