~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2006-01-13 07:05:33 UTC
  • mto: (1685.1.1 bzr-encoding)
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060113070533-0342c358fb4e8416
Fix some of the tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
        if revision_id is None and revision is None:
154
154
            raise BzrCommandError('You must supply either --revision or a revision_id')
155
155
        b = WorkingTree.open_containing(u'.')[0].branch
 
156
 
 
157
        # TODO: jam 20060112 should cat-revision always output utf-8?
156
158
        if revision_id is not None:
157
 
            sys.stdout.write(b.get_revision_xml(revision_id))
 
159
            self.outf.write(b.get_revision_xml(revision_id).decode('utf-8'))
158
160
        elif revision is not None:
159
161
            for rev in revision:
160
162
                if rev is None:
161
163
                    raise BzrCommandError('You cannot specify a NULL revision.')
162
164
                revno, rev_id = rev.in_history(b)
163
 
                sys.stdout.write(b.get_revision_xml(rev_id))
 
165
                self.outf.write(b.get_revision_xml(rev_id).decode('utf-8'))
164
166
    
165
167
 
166
168
class cmd_revno(Command):