/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/test_bisect.py

  • Committer: Jelmer Vernooij
  • Date: 2018-04-02 00:52:27 UTC
  • mfrom: (6939 work)
  • mto: This revision was merged to the branch mainline in revision 7274.
  • Revision ID: jelmer@jelmer.uk-20180402005227-pecflp1mvdjrjqd6
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from __future__ import absolute_import
20
20
 
21
 
from cStringIO import StringIO
 
21
from ..sixish import StringIO
22
22
import os
23
23
import shutil
24
24
 
115
115
        repo = self.tree.branch.repository
116
116
        top_revtree = repo.revision_tree(self.tree.last_revision())
117
117
        top_revtree.lock_read()
118
 
        top_file = top_revtree.get_file(top_revtree.path2id("test_file"))
 
118
        top_file = top_revtree.get_file("test_file")
119
119
        test_content = top_file.read().strip()
120
120
        top_file.close()
121
121
        top_revtree.unlock()
126
126
        repo = self.tree.branch.repository
127
127
        sub_revtree = repo.revision_tree(self.subtree_rev)
128
128
        sub_revtree.lock_read()
129
 
        sub_file = sub_revtree.get_file(sub_revtree.path2id("test_file"))
 
129
        sub_file = sub_revtree.get_file("test_file")
130
130
        test_content = sub_file.read().strip()
131
131
        sub_file.close()
132
132
        sub_revtree.unlock()
141
141
        # Not a very good test; just makes sure the code doesn't fail,
142
142
        # not that the output makes any sense.
143
143
        sio = StringIO()
144
 
        bisect.BisectCurrent(self.tree.controldir).show_rev_log(out=sio)
 
144
        bisect.BisectCurrent(self.tree.controldir).show_rev_log(outf=sio)
145
145
 
146
146
    def testShowLogSubtree(self):
147
147
        """Test that a subtree's log can be shown."""
148
148
        current = bisect.BisectCurrent(self.tree.controldir)
149
149
        current.switch(self.subtree_rev)
150
150
        sio = StringIO()
151
 
        current.show_rev_log(out=sio)
 
151
        current.show_rev_log(outf=sio)
152
152
 
153
153
    def testSwitchVersions(self):
154
154
        """Test switching versions."""