/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Alexander Belchenko
  • Date: 2008-02-06 13:43:53 UTC
  • mfrom: (3211 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3231.
  • Revision ID: bialix@ukr.net-20080206134353-hmkib323nxgq3tw6
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
610
610
            else:
611
611
                display_url = urlutils.unescape_for_display(stored_loc,
612
612
                        self.outf.encoding)
613
 
                self.outf.write("Using saved location: %s\n" % display_url)
 
613
                if not is_quiet():
 
614
                    self.outf.write("Using saved location: %s\n" % display_url)
614
615
                location = stored_loc
615
616
                location_transport = transport.get_transport(
616
617
                    location, possible_transports=possible_transports)
2598
2599
                                 ' expression.'),
2599
2600
                     Option('strict', help='Fail on missing dependencies or '
2600
2601
                            'known failures.'),
2601
 
                     Option('coverage', type=str, argname="DIRECTORY",
2602
 
                            help='Generate line coverage report in this '
2603
 
                                 'directory.'),
 
2602
                     Option('load-list', type=str, argname='TESTLISTFILE',
 
2603
                            help='Load a test id list from a text file.'),
2604
2604
                     ]
2605
2605
    encoding_type = 'replace'
2606
2606
 
2608
2608
            transport=None, benchmark=None,
2609
2609
            lsprof_timed=None, cache_dir=None,
2610
2610
            first=False, list_only=False,
2611
 
            randomize=None, exclude=None, strict=False, coverage=None):
 
2611
            randomize=None, exclude=None, strict=False,
 
2612
            load_list=None):
2612
2613
        import bzrlib.ui
2613
2614
        from bzrlib.tests import selftest
2614
2615
        import bzrlib.benchmarks as benchmarks
2650
2651
                              random_seed=randomize,
2651
2652
                              exclude_pattern=exclude,
2652
2653
                              strict=strict,
2653
 
                              coverage_dir=coverage,
 
2654
                              load_list=load_list,
2654
2655
                              )
2655
2656
        finally:
2656
2657
            if benchfile is not None:
2874
2875
        from bzrlib.diff import show_diff_trees
2875
2876
        tree_merger = merger.make_merger()
2876
2877
        tt = tree_merger.make_preview_transform()
2877
 
        result_tree = tt.get_preview_tree()
2878
 
        show_diff_trees(merger.this_tree, result_tree, self.outf, old_label='',
2879
 
                        new_label='')
 
2878
        try:
 
2879
            result_tree = tt.get_preview_tree()
 
2880
            show_diff_trees(merger.this_tree, result_tree, self.outf,
 
2881
                            old_label='', new_label='')
 
2882
        finally:
 
2883
            tt.finalize()
2880
2884
 
2881
2885
    def _do_merge(self, merger, change_reporter, allow_pending, verified):
2882
2886
        merger.change_reporter = change_reporter
3345
3349
class cmd_plugins(Command):
3346
3350
    """List the installed plugins.
3347
3351
    
3348
 
    This command displays the list of installed plugins including the
3349
 
    path where each one is located and a short description of each.
 
3352
    This command displays the list of installed plugins including
 
3353
    version of plugin and a short description of each.
 
3354
 
 
3355
    --verbose shows the path where each plugin is located.
3350
3356
 
3351
3357
    A plugin is an external component for Bazaar that extends the
3352
3358
    revision control system, by adding or replacing code in Bazaar.
3359
3365
    install them. Instructions are also provided there on how to
3360
3366
    write new plugins using the Python programming language.
3361
3367
    """
 
3368
    takes_options = ['verbose']
3362
3369
 
3363
3370
    @display_command
3364
 
    def run(self):
 
3371
    def run(self, verbose=False):
3365
3372
        import bzrlib.plugin
3366
3373
        from inspect import getdoc
 
3374
        result = []
3367
3375
        for name, plugin in bzrlib.plugin.plugins().items():
3368
 
            print plugin.path(), "[%s]" % plugin.__version__
 
3376
            version = plugin.__version__
 
3377
            if version == 'unknown':
 
3378
                version = ''
 
3379
            name_ver = '%s %s' % (name, version)
3369
3380
            d = getdoc(plugin.module)
3370
3381
            if d:
3371
 
                print '\t', d.split('\n')[0]
 
3382
                doc = d.split('\n')[0]
 
3383
            else:
 
3384
                doc = '(no description)'
 
3385
            result.append((name_ver, doc, plugin.path()))
 
3386
        for name_ver, doc, path in sorted(result):
 
3387
            print name_ver
 
3388
            print '   ', doc
 
3389
            if verbose:
 
3390
                print '   ', path
 
3391
            print
3372
3392
 
3373
3393
 
3374
3394
class cmd_testament(Command):