~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Andrew Bennetts
  • Date: 2008-04-28 06:24:16 UTC
  • mfrom: (3385 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3386.
  • Revision ID: andrew.bennetts@canonical.com-20080428062416-f7niegy7ekq4oftx
Merge from 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):