SCons: Attempt to deal with branches without upstream configured

This commit is contained in:
Sergey Sharybin
2015-03-20 14:03:54 +05:00
parent 6de12b1b43
commit 6f51df5384

View File

@@ -441,7 +441,7 @@ def buildinfo(lenv, build_type):
no_upstream = False no_upstream = False
try : try :
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}']).strip() build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}'], stderr=subprocess.STDOUT).strip()
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
# assume branch has no upstream configured # assume branch has no upstream configured
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip() build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()