/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/revisiontree.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

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
22
 
 
23
 
from bzrlib import (
 
21
from . import (
24
22
    errors,
25
23
    revision,
26
24
    tree,
27
25
    )
 
26
from .sixish import (
 
27
    BytesIO,
 
28
    )
28
29
 
29
30
 
30
31
class RevisionTree(tree.Tree):
72
73
        return ret
73
74
 
74
75
    def get_file(self, file_id, path=None):
75
 
        return StringIO(self.get_file_text(file_id))
 
76
        return BytesIO(self.get_file_text(file_id))
76
77
 
77
78
    def is_locked(self):
78
79
        return self._repository.is_locked()
231
232
        try:
232
233
            for result in self._repository.iter_files_bytes(repo_desired_files):
233
234
                yield result
234
 
        except errors.RevisionNotPresent, e:
 
235
        except errors.RevisionNotPresent as e:
235
236
            raise errors.NoSuchFile(e.file_id)
236
237
 
237
238
    def annotate_iter(self, file_id,