95
95
b = Branch('.', init=True)
96
96
file('hello', 'w').write('hello')
97
97
file('buongia', 'w').write('buongia')
98
b.add(['hello', 'buongia'])
99
b.commit(message='add files')
98
b.add(['hello', 'buongia'],
99
['hello-id', 'buongia-id'])
100
b.commit(message='add files',
101
103
os.remove('hello')
102
104
file('buongia', 'w').write('new text')
103
105
b.commit(message='update text',
104
106
specific_files=['buongia'],
105
allow_pointless=False)
107
allow_pointless=False,
107
110
b.commit(message='remove hello',
108
111
specific_files=['hello'],
109
allow_pointless=False)
112
allow_pointless=False,
111
115
eq = self.assertEquals
118
tree2 = b.revision_tree('test@rev-2')
119
self.assertTrue(tree2.has_filename('hello'))
120
self.assertEquals(tree2.get_file_text('hello-id'), 'hello')
121
self.assertEquals(tree2.get_file_text('buongia-id'), 'new text')
123
tree3 = b.revision_tree('test@rev-3')
124
self.assertFalse(tree3.has_filename('hello'))
125
self.assertEquals(tree3.get_file_text('buongia-id'), 'new text')