137
137
b.rename_one('hello', 'fruity')
138
138
b.commit(message='renamed', rev_id='test@rev-2', allow_pointless=False)
140
eq = self.assertEquals
140
141
tree1 = b.revision_tree('test@rev-1')
141
self.assertEquals(tree1.id2path('hello-id'), 'hello')
142
self.assertEquals(tree1.get_file_text('hello-id'), 'contents of hello\n')
142
eq(tree1.id2path('hello-id'), 'hello')
143
eq(tree1.get_file_text('hello-id'), 'contents of hello\n')
143
144
self.assertFalse(tree1.has_filename('fruity'))
144
145
self.check_inventory_shape(tree1.inventory, ['hello'])
146
ie = tree1.inventory['hello-id']
147
eq(ie.entry_version, 'test@rev-1')
146
149
tree2 = b.revision_tree('test@rev-2')
147
self.assertEquals(tree2.id2path('hello-id'), 'fruity')
148
self.assertEquals(tree2.get_file_text('hello-id'), 'contents of hello\n')
150
eq(tree2.id2path('hello-id'), 'fruity')
151
eq(tree2.get_file_text('hello-id'), 'contents of hello\n')
149
152
self.check_inventory_shape(tree2.inventory, ['fruity'])
153
ie = tree2.inventory['hello-id']
154
eq(ie.entry_version, 'test@rev-2')
152
157
def test_reused_rev_id(self):