~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2010-02-25 06:17:27 UTC
  • mfrom: (5055 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5057.
  • Revision ID: mbp@sourcefrog.net-20100225061727-4sd9lt0qmdc6087t
merge news

Show diffs side-by-side

added added

removed removed

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