fix git-svn version extraction for local git branches

git-svn-id: svn://localhost/ardour2/branches/3.0@13962 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Robin Gareus 2013-01-21 22:41:31 +00:00
parent 049fda91cc
commit daf22cd327
1 changed files with 3 additions and 1 deletions

View File

@ -69,10 +69,12 @@ def fetch_gcc_version (CC):
return version
def fetch_git_revision (path):
cmd = "LANG= git log --abbrev HEAD^..HEAD " + path
cmd = "LANG= git log --abbrev HEAD^..HEAD"
output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
o = output[0].decode('utf-8')
rev = o.replace ("commit", "git")[0:10]
cmd = "LANG= git log --abbrev -n1 --grep 'git-svn-id'"
output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
for line in output:
try:
if "git-svn-id" in line: