~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-06-27 06:09:34 UTC
  • Revision ID: mbp@sourcefrog.net-20050627060934-42a3c6aad57d8093
- Merge John's nice short-log format.

- Change log code to produce output through a LogFormatter object, 
  constructed from a factory method, to allow for more easily adding
  multiple formats in the future.

Show diffs side-by-side

added added

removed removed

Lines of Context:
842
842
            forward=False,
843
843
            revision=None):
844
844
        from bzrlib import show_log, find_branch
 
845
        from bzrlib.log import log_formatter
845
846
        import codecs
846
847
 
847
848
        direction = (forward and 'forward') or 'reverse'
873
874
        # in e.g. the default C locale.
874
875
        outf = codecs.getwriter(bzrlib.user_encoding)(sys.stdout, errors='replace')
875
876
 
876
 
        show_log(b, file_id,
877
 
                 show_timezone=timezone,
 
877
        lf = log_formatter('short',
 
878
                           show_ids=show_ids,
 
879
                           to_file=outf,
 
880
                           show_timezone=timezone)
 
881
 
 
882
        show_log(b,
 
883
                 lf,
 
884
                 file_id,
878
885
                 verbose=verbose,
879
 
                 show_ids=show_ids,
880
 
                 to_file=outf,
881
886
                 direction=direction,
882
887
                 start_revision=revision[0],
883
888
                 end_revision=revision[1])