~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-05-26 15:13:20 UTC
  • Revision ID: mbp@sourcefrog.net-20050526151319-4821dee258bbaf30
- bug fix for printing logs containing unicode

Show diffs side-by-side

added added

removed removed

Lines of Context:
605
605
            show_ids=False,
606
606
            forward=False):
607
607
        from bzrlib import show_log, find_branch
 
608
        import codecs
608
609
 
609
610
        direction = (forward and 'forward') or 'reverse'
610
611
        
619
620
            b = find_branch('.', lock_mode='r')
620
621
            file_id = None
621
622
 
 
623
        mutter('encoding log as %r' % bzrlib.user_encoding)
 
624
        outf = codecs.getwriter(bzrlib.user_encoding)(sys.stdout)
 
625
 
622
626
        show_log(b, file_id,
623
627
                 show_timezone=timezone,
624
628
                 verbose=verbose,
625
629
                 show_ids=show_ids,
626
 
                 to_file=sys.stdout,
 
630
                 to_file=outf,
627
631
                 direction=direction)
628
632
 
629
633