[Pkg-bazaar-commits] ./bzr/unstable r605: - patch from Lalo Martins to show version of bzr itself

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:20:15 UTC 2009


------------------------------------------------------------
revno: 605
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Tue 2005-05-31 12:56:12 +1000
message:
  - patch from Lalo Martins to show version of bzr itself
    in the --version output
modified:
  bzrlib/commands.py
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2005-05-30 03:13:56 +0000
+++ b/bzrlib/commands.py	2005-05-31 02:56:12 +0000
@@ -963,6 +963,13 @@
 
 def show_version():
     print "bzr (bazaar-ng) %s" % bzrlib.__version__
+    # is bzrlib itself in a branch?
+    try:
+        branch = Branch(bzrlib.__path__[0])
+    except BzrError:
+        pass
+    else:
+        print "  (bzr checkout, revision %s)" % branch.revno()
     print bzrlib.__copyright__
     print "http://bazaar-ng.org/"
     print



More information about the Pkg-bazaar-commits mailing list