~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-07-04 08:06:51 UTC
  • Revision ID: mbp@sourcefrog.net-20050704080651-6ecec49164359e48
- track pending-merges

- unit tests for this

Show diffs side-by-side

added added

removed removed

Lines of Context:
835
835
    """
836
836
 
837
837
    takes_args = ['filename?']
838
 
    takes_options = ['forward', 'timezone', 'verbose', 'show-ids', 'revision']
 
838
    takes_options = ['forward', 'timezone', 'verbose', 'show-ids', 'revision','long']
839
839
    
840
840
    def run(self, filename=None, timezone='original',
841
841
            verbose=False,
842
842
            show_ids=False,
843
843
            forward=False,
844
 
            revision=None):
 
844
            revision=None,
 
845
            long=False):
845
846
        from bzrlib.branch import find_branch
846
847
        from bzrlib.log import log_formatter, show_log
847
848
        import codecs
875
876
        # in e.g. the default C locale.
876
877
        outf = codecs.getwriter(bzrlib.user_encoding)(sys.stdout, errors='replace')
877
878
 
878
 
        lf = log_formatter('short',
 
879
        if long:
 
880
            log_format = 'long'
 
881
        else:
 
882
            log_format = 'short'
 
883
        lf = log_formatter(log_format,
879
884
                           show_ids=show_ids,
880
885
                           to_file=outf,
881
886
                           show_timezone=timezone)
1348
1353
    'version':                None,
1349
1354
    'email':                  None,
1350
1355
    'update':                 None,
 
1356
    'long':                   None,
1351
1357
    }
1352
1358
 
1353
1359
SHORT_OPTIONS = {
1356
1362
    'm':                      'message',
1357
1363
    'r':                      'revision',
1358
1364
    'v':                      'verbose',
 
1365
    'l':                      'long',
1359
1366
}
1360
1367
 
1361
1368