~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-05-05 08:26:20 UTC
  • Revision ID: mbp@sourcefrog.net-20050505082620-3c5b7d3a87e909d7
- New usage bzr log FILENAME

Show diffs side-by-side

added added

removed removed

Lines of Context:
419
419
    TODO: Option to limit range.
420
420
 
421
421
    TODO: Perhaps show most-recent first with an option for last.
422
 
 
423
 
    TODO: Option to limit to only a single file or to get log for a
424
 
          different directory.
425
422
    """
 
423
    takes_args = ['filename?']
426
424
    takes_options = ['timezone', 'verbose', 'show-ids']
427
 
    def run(self, timezone='original', verbose=False, show_ids=False):
428
 
        b = Branch('.', lock_mode='r')
429
 
        bzrlib.show_log(b,
 
425
    def run(self, filename=None, timezone='original', verbose=False, show_ids=False):
 
426
        b = Branch((filename or '.'), lock_mode='r')
 
427
        if filename:
 
428
            filename = b.relpath(filename)
 
429
        bzrlib.show_log(b, filename,
430
430
                        show_timezone=timezone,
431
431
                        verbose=verbose,
432
432
                        show_ids=show_ids)