@@ -21,7 +21,7 @@ def get_revision(repopath):
return subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=repopath).decode('utf-8').strip()
def get_branch(repopath):
- return subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"], cwd=repopath).decode('utf-8').strip()
+ return subprocess.check_output(["git", "name-rev", "--name-only", "HEAD"], cwd=repopath).decode('utf-8').strip()
jsonprops = {}
jsonprops['commit_yocto-autobuilder-helper'] = get_revision(builddir + "/../yocto-autobuilder-helper/")
Now that we have a whinlatter branch, we're seeing HEAD being reported instead of the real branch name. For some reason buildbot leaves the tree in a detached head state even though the revisions match and this doesn't work with rev-parse. Try using name-rev instead (thanks Mathieu for the pointer). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- scripts/getproperties.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)