165
165
# indicator. i.e. NULL_REVISION
167
167
tree = self.make_branch_and_tree('.')
168
tree.commit('1', rev_id = '1', allow_pointless=True)
169
tree.commit('2', rev_id = '2', allow_pointless=True)
170
tree.commit('3', rev_id = '3', allow_pointless=True)
171
rev = tree.branch.repository.get_revision('1')
172
history = rev.get_history(tree.branch.repository)
173
self.assertEqual([None, '1'], history)
174
rev = tree.branch.repository.get_revision('2')
175
history = rev.get_history(tree.branch.repository)
176
self.assertEqual([None, '1', '2'], history)
177
rev = tree.branch.repository.get_revision('3')
178
history = rev.get_history(tree.branch.repository)
179
self.assertEqual([None, '1', '2', '3'], history)
168
tree.commit('1', rev_id=b'1', allow_pointless=True)
169
tree.commit('2', rev_id=b'2', allow_pointless=True)
170
tree.commit('3', rev_id=b'3', allow_pointless=True)
171
rev = tree.branch.repository.get_revision(b'1')
172
history = rev.get_history(tree.branch.repository)
173
self.assertEqual([None, b'1'], history)
174
rev = tree.branch.repository.get_revision(b'2')
175
history = rev.get_history(tree.branch.repository)
176
self.assertEqual([None, b'1', b'2'], history)
177
rev = tree.branch.repository.get_revision(b'3')
178
history = rev.get_history(tree.branch.repository)
179
self.assertEqual([None, b'1', b'2', b'3'], history)
182
182
class TestReservedId(TestCase):