~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Martin Pool
  • Date: 2005-07-29 13:15:34 UTC
  • Revision ID: mbp@sourcefrog.net-20050729131534-880b01bec0c3573f
- refactor LogFormatter code

Show diffs side-by-side

added added

removed removed

Lines of Context:
237
237
 
238
238
class LogFormatter(object):
239
239
    """Abstract class to display log messages."""
240
 
    def __init__(self, to_file, show_ids=False, show_timezone=False):
 
240
    def __init__(self, to_file, show_ids=False, show_timezone='original'):
241
241
        self.to_file = to_file
242
242
        self.show_ids = show_ids
243
243
        self.show_timezone = show_timezone
262
262
        if self.show_ids:
263
263
            print >>to_file,  'revision-id:', rev.revision_id
264
264
        print >>to_file,  'committer:', rev.committer
265
 
        print >>to_file,  'timestamp: %s' % (format_date(rev.timestamp, rev.timezone or 0,
266
 
                                             self.show_timezone))
 
265
 
 
266
        date_str = format_date(rev.timestamp,
 
267
                               rev.timezone or 0,
 
268
                               self.show_timezone)
 
269
        print >>to_file,  'timestamp: %s' % date_str
267
270
 
268
271
        print >>to_file,  'message:'
269
272
        if not rev.message: