diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-07-23 12:04:46 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-07-23 12:04:46 +0000 |
commit | c948806811e106cebc20b982aeebd8e43a934652 (patch) | |
tree | b9fecc1afe26519793c45df3c456478d28b85999 /wscript | |
parent | 38510cb19e217c62a8e1e1664bed13f44c42ef08 (diff) |
bzr revision support (thomas v.)
git-svn-id: svn://localhost/ardour2/branches/3.0@5417 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -5,6 +5,7 @@ import os import commands import re import string +import subprocess # Variables for 'waf dist' VERSION = '3.0pre0' @@ -53,12 +54,23 @@ def fetch_git_revision (path): pass return rev +def fetch_bzr_revision (path): + cmd = subprocess.Popen("LANG= bzr log -l 1 " + path, stdout=subprocess.PIPE, shell=True) + out = cmd.communicate()[0] + svn = re.search('^svn revno: [0-9]*', out, re.MULTILINE) + str = svn.group(0) + chars = 'svnreio: ' + return string.lstrip(str, chars) + def create_stored_revision(): rev = "" if os.path.exists('.svn'): rev = fetch_svn_revision('.'); elif os.path.exists('.git'): rev = fetch_git_revision('.'); + elif os.path.exists('.bzr'): + rev = fetch_bzr_revision('.'); + print "Revision: " + rev; elif os.path.exists('libs/ardour/svn_revision.cc'): print "Using packaged svn revision" return |