version: use abbreviated SHA instead of explicit _VERSION in master branch
authorW. Trevor King <wking@tremily.us>
Thu, 25 Oct 2012 23:07:09 +0000 (19:07 -0400)
committerW. Trevor King <wking@tremily.us>
Thu, 25 Oct 2012 23:09:45 +0000 (19:09 -0400)
Only official releases get a version number, which should help avoid
confusion.  If you're running a live checkout, you shouldn't be scared
off by SHAs.

libbe/version.py

index 91818f4f1759d9b63adc37df2d1962d0b1050855..fb629f056a9e00c6d3c48df83ddee824b7c63f80 100644 (file)
@@ -41,7 +41,7 @@ except ImportError, e:
         }
 
 # Manually set a version string (optional, defaults to bzr revision id)
-_VERSION = '1.0.0'
+#_VERSION = '1.2.3'
 
 def version(verbose=False):
     """
@@ -52,7 +52,7 @@ def version(verbose=False):
     if "_VERSION" in globals():
         string = _VERSION
     else:
-        string = version_info['revision']
+        string = version_info['revision'][:8]
     if verbose == True:
         info = copy.copy(version_info)
         info['storage'] = libbe.storage.STORAGE_VERSION