[Pkg-bazaar-commits] ./bzr/unstable r996: - refactor LogFormatter code

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:21:42 UTC 2009


------------------------------------------------------------
revno: 996
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Fri 2005-07-29 10:15:34 -0300
message:
  - refactor LogFormatter code
modified:
  bzrlib/log.py
-------------- next part --------------
=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py	2005-07-28 11:56:51 +0000
+++ b/bzrlib/log.py	2005-07-29 13:15:34 +0000
@@ -237,7 +237,7 @@
 
 class LogFormatter(object):
     """Abstract class to display log messages."""
-    def __init__(self, to_file, show_ids=False, show_timezone=False):
+    def __init__(self, to_file, show_ids=False, show_timezone='original'):
         self.to_file = to_file
         self.show_ids = show_ids
         self.show_timezone = show_timezone
@@ -262,8 +262,11 @@
         if self.show_ids:
             print >>to_file,  'revision-id:', rev.revision_id
         print >>to_file,  'committer:', rev.committer
-        print >>to_file,  'timestamp: %s' % (format_date(rev.timestamp, rev.timezone or 0,
-                                             self.show_timezone))
+
+        date_str = format_date(rev.timestamp,
+                               rev.timezone or 0,
+                               self.show_timezone)
+        print >>to_file,  'timestamp: %s' % date_str
 
         print >>to_file,  'message:'
         if not rev.message:



More information about the Pkg-bazaar-commits mailing list