~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_commit.py

move move() from Branch to WorkingTree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
190
190
        self.build_tree(['hello', 'a/', 'b/'])
191
191
        b.working_tree().add(['hello', 'a', 'b'], ['hello-id', 'a-id', 'b-id'])
192
192
        b.working_tree().commit('initial', rev_id=r1, allow_pointless=False)
193
 
 
194
 
        b.move(['hello'], 'a')
 
193
        b.working_tree().move(['hello'], 'a')
195
194
        r2 = 'test@rev-2'
196
195
        b.working_tree().commit('two', rev_id=r2, allow_pointless=False)
197
196
        self.check_inventory_shape(b.working_tree().read_working_inventory(),
198
197
                                   ['a', 'a/hello', 'b'])
199
198
 
200
 
        b.move(['b'], 'a')
 
199
        b.working_tree().move(['b'], 'a')
201
200
        r3 = 'test@rev-3'
202
201
        b.working_tree().commit('three', rev_id=r3, allow_pointless=False)
203
202
        self.check_inventory_shape(b.working_tree().read_working_inventory(),
205
204
        self.check_inventory_shape(b.get_revision_inventory(r3),
206
205
                                   ['a', 'a/hello', 'a/b'])
207
206
 
208
 
        b.move([os.sep.join(['a', 'hello'])],
 
207
        b.working_tree().move([os.sep.join(['a', 'hello'])],
209
208
               os.sep.join(['a', 'b']))
210
209
        r4 = 'test@rev-4'
211
210
        b.working_tree().commit('four', rev_id=r4, allow_pointless=False)
216
215
        eq(inv['hello-id'].revision, r4)
217
216
        eq(inv['a-id'].revision, r1)
218
217
        eq(inv['b-id'].revision, r3)
219
 
 
220
218
        
221
219
    def test_removed_commit(self):
222
220
        """Commit with a removed file"""