~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/rev_storage.py

Fixed cat command

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
            inv = self.get_revision_inventory(revision_id)
206
206
            return RevisionTree(self.weave_store, inv, revision_id)
207
207
 
 
208
    @needs_read_lock
 
209
    def print_file(self, file, revision_id):
 
210
        """Print `file` to stdout."""
 
211
        tree = self.revision_tree(revision_id)
 
212
        # use inventory as it was in that revision
 
213
        file_id = tree.inventory.path2id(file)
 
214
        if not file_id:
 
215
            raise BzrError("%r is not present in revision %s" % (file, revno))
 
216
        tree.print_file(file_id)
 
217
 
 
218
 
208
219
    def get_transaction(self):
209
220
        return self.control_files.get_transaction()
210
221