/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_cat_revision.py

Use new context stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        wt.commit('Commit two', rev_id='a@r-0-2')
38
38
        wt.commit('Commit three', rev_id='a@r-0-3')
39
39
 
40
 
        r.lock_read()
41
 
        try:
 
40
        with r.lock_read():
42
41
            revs = {}
43
42
            for i in (1, 2, 3):
44
43
                revid = "a@r-0-%d" % i
45
44
                stream = r.revisions.get_record_stream([(revid,)], 'unordered', 
46
45
                                                       False) 
47
46
                revs[i] = stream.next().get_bytes_as('fulltext')
48
 
        finally:
49
 
            r.unlock()
50
47
 
51
48
        for i in [1, 2, 3]:
52
49
            self.assertEqual(revs[i],