~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 03:02:45 UTC
  • Revision ID: mbp@sourcefrog.net-20050531030244-d9bbefb14ee48d88
- new bzrlib.get_bzr_revision() tells about the history of 
  bzr itself
- also display revision-id in --version output

Show diffs side-by-side

added added

removed removed

Lines of Context:
964
964
def show_version():
965
965
    print "bzr (bazaar-ng) %s" % bzrlib.__version__
966
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()
 
967
    bzrrev = bzrlib.get_bzr_revision()
 
968
    if bzrrev:
 
969
        print "  (bzr checkout, revision %d {%s})" % bzrrev
973
970
    print bzrlib.__copyright__
974
971
    print "http://bazaar-ng.org/"
975
972
    print