~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Martin Pool
  • Date: 2008-04-28 03:52:09 UTC
  • mfrom: (3360.3.3 1.4)
  • mto: This revision was merged to the branch mainline in revision 3385.
  • Revision ID: mbp@sourcefrog.net-20080428035209-2sfjlaeijx20wt1z
Merge back 1.4 and start 1.5 (but not transaction cache reinstatement)

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):