~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1123
1123
    takes_args = ['location?']
1124
1124
    takes_options = [
1125
1125
                     RegistryOption('format',
1126
 
                            help='Specify a format for this branch. Current'
1127
 
                                 ' formats are: default, knit, metaweave and'
1128
 
                                 ' weave. Default is knit; metaweave and'
1129
 
                                 ' weave are deprecated',
 
1126
                            help='Specify a format for this branch. See "bzr '
 
1127
                            'help formats" for details',
1130
1128
                            converter=bzrdir.format_registry.make_bzrdir,
1131
1129
                            registry=bzrdir.format_registry,
1132
 
                            value_switches=True),
 
1130
                            value_switches=True, title="Branch Format"),
1133
1131
                     ]
1134
1132
    def run(self, location=None, format=None):
1135
1133
        if format is None:
1183
1181
    """
1184
1182
    takes_args = ["location"] 
1185
1183
    takes_options = [RegistryOption('format',
1186
 
                            help='Specify a format for this repository.'
1187
 
                                 ' Current formats are: default, knit,'
1188
 
                                 ' metaweave and weave. Default is knit;'
1189
 
                                 ' metaweave and weave are deprecated',
 
1184
                            help='Specify a format for this repository. See'
 
1185
                                 ' "bzr help formats" for details',
1190
1186
                            registry=bzrdir.format_registry,
1191
1187
                            converter=bzrdir.format_registry.make_bzrdir,
1192
 
                            value_switches=True),
 
1188
                            value_switches=True, title='Repository format'),
1193
1189
                     Option('trees',
1194
1190
                             help='Allows branches in repository to have'
1195
1191
                             ' a working tree')]
1424
1420
                             help='show files changed in each revision'),
1425
1421
                     'show-ids', 'revision',
1426
1422
                     'log-format',
1427
 
                     'line', 'long', 
1428
1423
                     Option('message',
1429
1424
                            short_name='m',
1430
1425
                            help='show revisions whose message matches this regexp',
1431
1426
                            type=str),
1432
 
                     'short',
1433
1427
                     ]
1434
1428
    encoding_type = 'replace'
1435
1429
 
1440
1434
            forward=False,
1441
1435
            revision=None,
1442
1436
            log_format=None,
1443
 
            message=None,
1444
 
            long=False,
1445
 
            short=False,
1446
 
            line=False):
1447
 
        from bzrlib.log import log_formatter, show_log
 
1437
            message=None):
 
1438
        from bzrlib.log import show_log
1448
1439
        assert message is None or isinstance(message, basestring), \
1449
1440
            "invalid message argument %r" % message
1450
1441
        direction = (forward and 'forward') or 'reverse'
1511
1502
        if rev1 > rev2:
1512
1503
            (rev2, rev1) = (rev1, rev2)
1513
1504
 
1514
 
        if (log_format is None):
1515
 
            default = b.get_config().log_format()
1516
 
            log_format = get_log_format(long=long, short=short, line=line, 
1517
 
                                        default=default)
1518
 
        lf = log_formatter(log_format,
1519
 
                           show_ids=show_ids,
1520
 
                           to_file=self.outf,
1521
 
                           show_timezone=timezone)
 
1505
        if log_format is None:
 
1506
            log_format = log.log_formatter_registry.get_default(b)
 
1507
 
 
1508
        lf = log_format(show_ids=show_ids, to_file=self.outf,
 
1509
                        show_timezone=timezone)
1522
1510
 
1523
1511
        show_log(b,
1524
1512
                 lf,
2031
2019
    takes_args = ['url?']
2032
2020
    takes_options = [
2033
2021
                    RegistryOption('format',
2034
 
                        help='Upgrade to a specific format. Current formats'
2035
 
                             ' are: default, knit, metaweave and weave.'
2036
 
                             ' Default is knit; metaweave and weave are'
2037
 
                             ' deprecated',
 
2022
                        help='Upgrade to a specific format.  See "bzr help'
 
2023
                             ' formats" for details',
2038
2024
                        registry=bzrdir.format_registry,
2039
2025
                        converter=bzrdir.format_registry.make_bzrdir,
2040
 
                        value_switches=True),
 
2026
                        value_switches=True, title='Branch format'),
2041
2027
                    ]
2042
2028
 
2043
2029
 
2657
2643
                     Option('theirs-only', 
2658
2644
                            'Display changes in the remote branch only'), 
2659
2645
                     'log-format',
2660
 
                     'line',
2661
 
                     'long', 
2662
 
                     'short',
2663
2646
                     'show-ids',
2664
2647
                     'verbose'
2665
2648
                     ]
2690
2673
            try:
2691
2674
                local_extra, remote_extra = find_unmerged(local_branch, remote_branch)
2692
2675
                if (log_format is None):
2693
 
                    default = local_branch.get_config().log_format()
2694
 
                    log_format = get_log_format(long=long, short=short, 
2695
 
                                                line=line, default=default)
2696
 
                lf = log_formatter(log_format,
2697
 
                                   to_file=self.outf,
2698
 
                                   show_ids=show_ids,
2699
 
                                   show_timezone='original')
 
2676
                    log_format = log.log_formatter_registry.get_default(
 
2677
                        local_branch)
 
2678
                lf = log_format(to_file=self.outf,
 
2679
                                show_ids=show_ids,
 
2680
                                show_timezone='original')
2700
2681
                if reverse is False:
2701
2682
                    local_extra.reverse()
2702
2683
                    remote_extra.reverse()