~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2007-06-20 02:39:38 UTC
  • mto: (2520.5.2 bzr.mpbundle)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: aaron.bentley@utoronto.ca-20070620023938-dsrywb9k05tschj7
Hang a create_bundle method off repository

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
686
687
        revtree = branch.repository.revision_tree(REV_ID)
687
688
        contents = revtree.get_file_text(FOO_ID)
688
689
        self.assertEqual(contents, 'contents of repo/foo\n')
 
690
 
 
691
    def test_create_bundle(self):
 
692
        wt = self.make_branch_and_tree('repo')
 
693
        self.build_tree(['repo/file1'])
 
694
        wt.add('file1')
 
695
        wt.commit('file1', rev_id='rev1')
 
696
        fileobj = StringIO()
 
697
        wt.branch.repository.create_bundle('rev1', NULL_REVISION, fileobj)