~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Robert Collins
  • Date: 2006-06-11 11:44:47 UTC
  • mfrom: (1762 +trunk)
  • mto: (1767.2.2 integration)
  • mto: This revision was merged to the branch mainline in revision 1769.
  • Revision ID: robertc@robertcollins.net-20060611114447-ba56b7e27a72c941
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
662
662
                          verbose=False)
663
663
        self.tree1.commit(u'Merge', rev_id='a@lmod-0-4')
664
664
        bundle = self.get_valid_bundle('a@lmod-0-2a', 'a@lmod-0-4')
665
 
 
666
 
    def test_hide_history(self):
667
 
        import os, sys
668
 
        pjoin = os.path.join
669
 
 
670
 
        self.tree1 = BzrDir.create_standalone_workingtree('b1')
671
 
        self.b1 = self.tree1.branch
672
 
 
673
 
        open(pjoin('b1/one'), 'wb').write('one\n')
674
 
        self.tree1.add('one')
675
 
        self.tree1.commit('add file', rev_id='a@cset-0-1')
676
 
        open(pjoin('b1/one'), 'wb').write('two\n')
677
 
        self.tree1.commit('modify', rev_id='a@cset-0-2')
678
 
        open(pjoin('b1/one'), 'wb').write('three\n')
679
 
        self.tree1.commit('modify', rev_id='a@cset-0-3')
680
 
        bundle_file = StringIO()
681
 
        rev_ids = write_bundle(self.tree1.branch.repository, 'a@cset-0-3',
682
 
                               'a@cset-0-1', bundle_file)
683
 
        self.assertNotContainsRe(bundle_file.getvalue(), 'two')
684
 
        self.assertContainsRe(bundle_file.getvalue(), 'one')
685
 
        self.assertContainsRe(bundle_file.getvalue(), 'three')