~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/teststatus.py

[merge] much integrated work from robert and john

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
 
48
48
        tof = StringIO()
49
49
        self.build_tree(['hello.c', 'bye.c'])
50
 
        b.add_pending_merge('pending@pending-0-0')
 
50
        b.working_tree().add_pending_merge('pending@pending-0-0')
51
51
        show_status(b, to_file=tof)
52
52
        tof.seek(0)
53
53
        self.assertEquals(tof.readlines(),
67
67
        self.build_tree(['hello.c', 'bye.c'])
68
68
        b.add('hello.c')
69
69
        b.add('bye.c')
70
 
        b.commit('Test message')
 
70
        b.working_tree().commit('Test message')
71
71
 
72
72
        tof = StringIO()
73
73
        revs =[]
83
83
 
84
84
        self.build_tree(['more.c'])
85
85
        b.add('more.c')
86
 
        b.commit('Another test message')
 
86
        b.working_tree().commit('Another test message')
87
87
        
88
88
        tof = StringIO()
89
89
        revs.append(RevisionSpec(1))
106
106
        """Pending merges display works"""
107
107
        mkdir("./branch")
108
108
        b = Branch.initialize('./branch')
109
 
        b.commit("Empty commit 1")
 
109
        b.working_tree().commit("Empty commit 1")
110
110
        b_2 = copy_branch(b, './copy')
111
 
        b.commit("Empty commit 2")
 
111
        b.working_tree().commit("Empty commit 2")
112
112
        merge(["./branch", -1], [None, None], this_dir = './copy')
113
113
        message = self.status_string(b_2)
114
114
        self.assert_(message.startswith("pending merges:\n"))
115
115
        self.assert_(message.endswith("Empty commit 2\n")) 
116
 
        b_2.commit("merged")
 
116
        b_2.working_tree().commit("merged")
117
117
        # must be long to make sure we see elipsis at the end
118
 
        b.commit("Empty commit 3 blah blah blah blah blah blah blah blah blah"
 
118
        b.working_tree().commit("Empty commit 3 blah blah blah blah blah blah blah blah blah"
119
119
                 " blah blah blah blah blah blah bleh")
120
120
        merge(["./branch", -1], [None, None], this_dir = './copy')
121
121
        message = self.status_string(b_2)
134
134
        self.build_tree(['directory/','directory/hello.c', 'bye.c','test.c','dir2/'])
135
135
        b.add('directory')
136
136
        b.add('test.c')
137
 
        b.commit('testing')
 
137
        b.working_tree().commit('testing')
138
138
        
139
139
        tof = StringIO()
140
140
        show_status(b, to_file=tof)