~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-05-19 11:11:53 UTC
  • Revision ID: mbp@sourcefrog.net-20050519111153-7f799c5987a540c7
- --forward option for log

Show diffs side-by-side

added added

removed removed

Lines of Context:
585
585
    """Show log of this branch.
586
586
 
587
587
    TODO: Option to limit range.
 
588
    """
588
589
 
589
 
    TODO: Option to show in forward order.
590
 
    """
591
590
    takes_args = ['filename?']
592
 
    takes_options = ['timezone', 'verbose', 'show-ids']
593
 
    def run(self, filename=None, timezone='original', verbose=False, show_ids=False):
 
591
    takes_options = ['forward', 'timezone', 'verbose', 'show-ids']
 
592
    
 
593
    def run(self, filename=None, timezone='original',
 
594
            verbose=False,
 
595
            show_ids=False,
 
596
            forward=False):
594
597
        from bzrlib import show_log, find_branch
 
598
 
 
599
        direction = (forward and 'forward') or 'reverse'
595
600
        
596
601
        if filename:
597
602
            b = find_branch(filename, lock_mode='r')
608
613
                 show_timezone=timezone,
609
614
                 verbose=verbose,
610
615
                 show_ids=show_ids,
611
 
                 to_file=sys.stdout)
 
616
                 to_file=sys.stdout,
 
617
                 direction=direction)
612
618
 
613
619
 
614
620
 
959
965
    'all':                    None,
960
966
    'help':                   None,
961
967
    'file':                   unicode,
 
968
    'forward':                None,
962
969
    'message':                unicode,
963
970
    'profile':                None,
964
971
    'revision':               int,