/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

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2719
2719
    """Show version of bzr."""
2720
2720
 
2721
2721
    encoding_type = 'replace'
 
2722
    takes_options = [
 
2723
        Option("short", help="Print just the version number."),
 
2724
        ]
2722
2725
 
2723
2726
    @display_command
2724
 
    def run(self):
 
2727
    def run(self, short=False):
2725
2728
        from bzrlib.version import show_version
2726
 
        show_version(to_file=self.outf)
 
2729
        if short:
 
2730
            self.outf.write(bzrlib.version_string + '\n')
 
2731
        else:
 
2732
            show_version(to_file=self.outf)
2727
2733
 
2728
2734
 
2729
2735
class cmd_rocks(Command):
4107
4113
               'rather than the one containing the working directory.',
4108
4114
               short_name='f',
4109
4115
               type=unicode),
4110
 
        Option('output', short_name='o', help='Write directive to this file.',
 
4116
        Option('output', short_name='o',
 
4117
               help='Write merge directive to this file; '
 
4118
                    'use - for stdout.',
4111
4119
               type=unicode),
4112
4120
        Option('mail-to', help='Mail the request to this address.',
4113
4121
               type=unicode),
4436
4444
                     tree='Reconfigure to a tree.',
4437
4445
                     checkout='Reconfigure to a checkout.',
4438
4446
                     lightweight_checkout='Reconfigure to a lightweight'
4439
 
                     ' checkout.'),
 
4447
                     ' checkout.',
 
4448
                     standalone='Reconfigure to be standalone.',
 
4449
                     use_shared='Reconfigure to use a shared repository.'),
4440
4450
                     Option('bind-to', help='Branch to bind checkout to.',
4441
4451
                            type=str),
4442
4452
                     Option('force',
4458
4468
        elif target_type == 'lightweight-checkout':
4459
4469
            reconfiguration = reconfigure.Reconfigure.to_lightweight_checkout(
4460
4470
                directory, bind_to)
 
4471
        elif target_type == 'use-shared':
 
4472
            reconfiguration = reconfigure.Reconfigure.to_use_shared(directory)
 
4473
        elif target_type == 'standalone':
 
4474
            reconfiguration = reconfigure.Reconfigure.to_standalone(directory)
4461
4475
        reconfiguration.apply(force)
4462
4476
 
4463
4477