Updated _version.py and version.py to work with Git
authorW. Trevor King <wking@drexel.edu>
Tue, 22 Jun 2010 23:05:19 +0000 (19:05 -0400)
committerW. Trevor King <wking@drexel.edu>
Tue, 22 Jun 2010 23:05:19 +0000 (19:05 -0400)
Makefile
libbe/version.py

index e9e1748d76531ac029849fece555d75bed3c5fef..d851fb121fcc51d3153cf0096a4c5b646a7f7996 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -68,7 +68,7 @@ clean:
 \f
 .PHONY: libbe/_version.py
 libbe/_version.py:
-       bzr version-info --format python > $@
+       git show --pretty='format:"Autogenerated by make libbe/_version.py"%nversion_info = {%n    "date":"%ci",%n    "revision":"%H",%n    "committer":"%cn"}' > $@
 
 .PHONY: man
 man: ${MANPAGE_FILES}
index 2792de4583626933ba2bbdf9c050cb602ee39c55..e1c5f1f01d84e006d779c2eecadb6ca51cc8b08c 100644 (file)
@@ -35,19 +35,19 @@ def version(verbose=False):
     """
     Returns the version string for this BE installation.  If
     verbose==True, the string will include extra lines with more
-    detail (e.g. bzr branch nickname, etc.).
+    detail (e.g. last committer's name, etc.).
     """
     if "_VERSION" in globals():
         string = _VERSION
     else:
-        string = _version.version_info["revision_id"]
+        string = _version.version_info['revision']
     if verbose == True:
         info = copy.copy(_version.version_info)
         info['storage'] = libbe.storage.STORAGE_VERSION
         string += ("\n"
-                   "revision: %(revno)d\n"
-                   "nick: %(branch_nick)s\n"
-                   "revision id: %(revision_id)s\n"
+                   "revision: %(revision)s\n"
+                   "date: %(date)s\n"
+                   "committer: %(committer)s\n"
                    "storage version: %(storage)s"
                    % info)
     return string