From: W. Trevor King Date: Tue, 22 Jun 2010 23:05:19 +0000 (-0400) Subject: Updated _version.py and version.py to work with Git X-Git-Tag: 1.0.0~54^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=74f1d681e8123833f22fbd0af751c9ebff85e530;p=be.git Updated _version.py and version.py to work with Git --- diff --git a/Makefile b/Makefile index e9e1748..d851fb1 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ clean: .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} diff --git a/libbe/version.py b/libbe/version.py index 2792de4..e1c5f1f 100644 --- a/libbe/version.py +++ b/libbe/version.py @@ -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