623
623
self.assertEqual(['notbxbfse'], vf.get_ancestry('notbxbfse'))
624
624
self.assertEqual([], vf.get_parents('notbxbfse'))
625
625
self.assertEqual({'notbxbfse':()}, vf.get_graph())
626
self.assertFalse(self.callDeprecated([osutils._revision_id_warning],
627
vf.has_version, parent_id_unicode))
628
626
self.assertFalse(vf.has_version(parent_id_utf8))
629
627
# we have _with_ghost apis to give us ghost information.
630
628
self.assertEqual([parent_id_utf8, 'notbxbfse'], vf.get_ancestry_with_ghosts(['notbxbfse']))
631
629
self.assertEqual([parent_id_utf8], vf.get_parents_with_ghosts('notbxbfse'))
632
630
self.assertEqual({'notbxbfse':[parent_id_utf8]}, vf.get_graph_with_ghosts())
633
self.assertTrue(self.callDeprecated([osutils._revision_id_warning],
634
vf.has_ghost, parent_id_unicode))
635
631
self.assertTrue(vf.has_ghost(parent_id_utf8))
636
632
# if we add something that is a ghost of another, it should correct the
637
633
# results of the prior apis
638
self.callDeprecated([osutils._revision_id_warning],
639
vf.add_lines, parent_id_unicode, [], [])
634
vf.add_lines(parent_id_utf8, [], [])
640
635
self.assertEqual([parent_id_utf8, 'notbxbfse'], vf.get_ancestry(['notbxbfse']))
641
636
self.assertEqual([parent_id_utf8], vf.get_parents('notbxbfse'))
642
637
self.assertEqual({parent_id_utf8:(),
643
638
'notbxbfse':(parent_id_utf8, ),
646
self.assertTrue(self.callDeprecated([osutils._revision_id_warning],
647
vf.has_version, parent_id_unicode))
648
641
self.assertTrue(vf.has_version(parent_id_utf8))
649
642
# we have _with_ghost apis to give us ghost information.
650
self.assertEqual([parent_id_utf8, 'notbxbfse'], vf.get_ancestry_with_ghosts(['notbxbfse']))
643
self.assertEqual([parent_id_utf8, 'notbxbfse'],
644
vf.get_ancestry_with_ghosts(['notbxbfse']))
651
645
self.assertEqual([parent_id_utf8], vf.get_parents_with_ghosts('notbxbfse'))
652
646
self.assertEqual({parent_id_utf8:[],
653
647
'notbxbfse':[parent_id_utf8],
655
649
vf.get_graph_with_ghosts())
656
self.assertFalse(self.callDeprecated([osutils._revision_id_warning],
657
vf.has_ghost, parent_id_unicode))
658
650
self.assertFalse(vf.has_ghost(parent_id_utf8))
660
652
def test_add_lines_with_ghosts_after_normal_revs(self):