~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-05-31 02:56:12 UTC
  • Revision ID: mbp@sourcefrog.net-20050531025612-1c84507625524411
- patch from Lalo Martins to show version of bzr itself
  in the --version output

Show diffs side-by-side

added added

removed removed

Lines of Context:
963
963
 
964
964
def show_version():
965
965
    print "bzr (bazaar-ng) %s" % bzrlib.__version__
 
966
    # is bzrlib itself in a branch?
 
967
    try:
 
968
        branch = Branch(bzrlib.__path__[0])
 
969
    except BzrError:
 
970
        pass
 
971
    else:
 
972
        print "  (bzr checkout, revision %s)" % branch.revno()
966
973
    print bzrlib.__copyright__
967
974
    print "http://bazaar-ng.org/"
968
975
    print