~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_inv.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-08 00:28:10 UTC
  • mfrom: (2617.6.9 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070808002810-703n3mr6b6hwataj
(robertc) Introduce write_groups for repositories, allowing repositories with the physical ability to do transactional data insertion to have that modelled within bzr. (Robert Collins).

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
            'fileid', 
81
81
            self.branch.repository.get_transaction()).get_lines('2')
82
82
        self.assertEqual(lines, ['contents of subdir/file\n'])
 
83
        self.wt.branch.repository.commit_write_group()
83
84
 
84
85
    def test_snapshot_unchanged(self):
85
86
        #This tests that a simple commit does not make a new entry for
94
95
        self.assertRaises(errors.RevisionNotPresent,
95
96
                          vf.get_lines,
96
97
                          '2')
 
98
        self.wt.branch.repository.commit_write_group()
97
99
 
98
100
    def test_snapshot_merge_identical_different_revid(self):
99
101
        # This tests that a commit with two identical parents, one of which has
114
116
                                  {'1':self.file_1, 'other':other_ie},
115
117
                                  self.wt, self.builder)
116
118
        self.assertEqual(self.file_active.revision, '2')
 
119
        self.wt.branch.repository.commit_write_group()
117
120
 
118
121
    def test_snapshot_changed(self):
119
122
        # This tests that a commit with one different parent results in a new
124
127
                                  self.wt, self.builder)
125
128
        # expected outcome - file_1 has a revision id of '2'
126
129
        self.assertEqual(self.file_active.revision, '2')
 
130
        self.wt.branch.repository.commit_write_group()
127
131
 
128
132
 
129
133
class TestApplyInventoryDelta(TestCaseWithWorkingTree):