~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_versionedfile.py

  • Committer: Martin Pool
  • Date: 2007-09-25 08:14:12 UTC
  • mto: This revision was merged to the branch mainline in revision 2895.
  • Revision ID: mbp@sourcefrog.net-20070925081412-ta60zj5qxfuokev3
Remove most calls to safe_file_id and safe_revision_id.

The deprecation period for passing unicode objects as revision ids is now over.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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, ),
644
639
                          },
645
640
                         vf.get_graph())
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],
654
648
                          },
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))
659
651
 
660
652
    def test_add_lines_with_ghosts_after_normal_revs(self):