~jameinel/bzr/fix-push2

« back to all changes in this revision

Viewing changes to bzrlib/tests/repository_implementations/test_repository.py

  • Committer: Aaron Bentley
  • Date: 2006-09-22 04:52:17 UTC
  • mfrom: (2029 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2078.
  • Revision ID: aaron.bentley@utoronto.ca-20060922045217-4e775bf2fc6d0b3b
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
561
561
    def test_corrupt_revision_get_revision_reconcile(self):
562
562
        repo = repository.Repository.open('inventory_with_unnecessary_ghost')
563
563
        repo.get_revision_reconcile('ghost')
 
564
 
 
565
 
 
566
class TestEscaping(TestCaseWithTransport):
 
567
    """Test that repositories can be stored correctly on VFAT transports.
 
568
    
 
569
    Makes sure we have proper escaping of invalid characters, etc.
 
570
 
 
571
    It'd be better to test all operations on the FakeVFATTransportDecorator,
 
572
    but working trees go straight to the os not through the Transport layer.
 
573
    Therefore we build some history first in the regular way and then 
 
574
    check it's safe to access for vfat.
 
575
    """
 
576
 
 
577
    def test_on_vfat(self):
 
578
        FOO_ID = 'foo<:>ID'
 
579
        REV_ID = 'revid-1'
 
580
        wt = self.make_branch_and_tree('repo')
 
581
        self.build_tree(["repo/foo"])
 
582
        # add file with id containing wierd characters
 
583
        wt.add(['foo'], [FOO_ID])
 
584
        wt.commit('this is my new commit', rev_id=REV_ID)
 
585
        # now access over vfat; should be safe
 
586
        branch = bzrdir.BzrDir.open('vfat+' + self.get_url('repo')).open_branch()
 
587
        revtree = branch.repository.revision_tree(REV_ID)
 
588
        contents = revtree.get_file_text(FOO_ID)
 
589
        self.assertEqual(contents, 'contents of repo/foo\n')