~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-07-19 16:09:34 UTC
  • mfrom: (2520.4.135 bzr.mpbundle)
  • Revision ID: pqm@pqm.ubuntu.com-20070719160934-d51fyijw69oto88p
Add new bundle and merge-directive formats

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Tests for bzrdir implementations - tests a bzrdir format."""
18
18
 
 
19
from cStringIO import StringIO
19
20
import re
20
21
 
21
22
import bzrlib
415
416
        repo._format.rich_root_data
416
417
        repo._format.supports_tree_reference
417
418
 
 
419
    def test_get_serializer_format(self):
 
420
        repo = self.make_repository('.')
 
421
        format = repo.get_serializer_format()
 
422
        self.assertEqual(repo._serializer.format_num, format)
 
423
 
418
424
 
419
425
class TestRepositoryLocking(TestCaseWithRepository):
420
426
 
679
685
        revtree = branch.repository.revision_tree(REV_ID)
680
686
        contents = revtree.get_file_text(FOO_ID)
681
687
        self.assertEqual(contents, 'contents of repo/foo\n')
 
688
 
 
689
    def test_create_bundle(self):
 
690
        wt = self.make_branch_and_tree('repo')
 
691
        self.build_tree(['repo/file1'])
 
692
        wt.add('file1')
 
693
        wt.commit('file1', rev_id='rev1')
 
694
        fileobj = StringIO()
 
695
        wt.branch.repository.create_bundle('rev1', NULL_REVISION, fileobj)