~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Erik Bågfors
  • Date: 2006-02-03 19:50:59 UTC
  • mto: (1185.50.77 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: erik@bagfors.nu-20060203195059-1cf8ff5aa68de0ea
Support for plugins to register log formatters and set default formatter
Also, change one command line option for "log"

Show diffs side-by-side

added added

removed removed

Lines of Context:
890
890
                            help='show from oldest to newest'),
891
891
                     'timezone', 'verbose', 
892
892
                     'show-ids', 'revision',
 
893
                     'log-format',
893
894
                     'line', 'long', 
894
895
                     Option('message',
895
896
                            help='show revisions whose message matches this regexp',
902
903
            show_ids=False,
903
904
            forward=False,
904
905
            revision=None,
 
906
            log_format=None,
905
907
            message=None,
906
908
            long=False,
907
909
            short=False,
958
960
        # in e.g. the default C locale.
959
961
        outf = codecs.getwriter(bzrlib.user_encoding)(sys.stdout, errors='replace')
960
962
 
961
 
        log_format = get_log_format(long=long, short=short, line=line)
 
963
        if (log_format == None):
 
964
            log_format = get_log_format(long=long, short=short, line=line)
 
965
 
962
966
        lf = log_formatter(log_format,
963
967
                           show_ids=show_ids,
964
968
                           to_file=outf,
973
977
                 end_revision=rev2,
974
978
                 search=message)
975
979
 
976
 
def get_log_format(long=False, short=False, line=False, default='long'):
 
980
def get_log_format(long=False, short=False, line=False, default='default'):
977
981
    log_format = default
978
982
    if long:
979
983
        log_format = 'long'