diff --git a/lib/gdbgitdb.py b/lib/gdbgitdb.py index 3f86f55..f412ecb 100644 --- a/lib/gdbgitdb.py +++ b/lib/gdbgitdb.py @@ -6,6 +6,22 @@ from sumfiles import get_web_base import os.path from datetime import datetime import git +import re + +def get_builder_commit_id (builder, commit): + """Get the commit hash in the BUILDER's repository which points to the +log files of the COMMIT that was tested.""" + repodir = os.path.join (get_web_base (), builder) + repo = git.Repo.init (path = repodir) + commit_id_re = re.compile ("^\d{8}-\d{6}-%s$" % commit) + + for t in repo.tags: + m = commit_id_re.match (t.name) + if not m: + continue + return t.commit.__str__ () + + return None class SaveGDBResults (ShellCommand): name = 'save build results' diff --git a/master.cfg b/master.cfg index b06e2d9..a2f8af8 100644 --- a/master.cfg +++ b/master.cfg @@ -146,7 +146,10 @@ send to the gdb-testers mailing list.""" # URL to find more info about what went wrong. text += "Log URL(s):\n" for ss in ss_list: - text += "\t<%s/%s/.git/log/?qt=grep&q=%s>\n" % (git_url, name, ss.revision) + text += "\t<%s/%s/.git/tree/?id=%s>\n" % (git_url, name, + get_builder_commit_id (name, + ss.revision)) +# text += "\t<%s/%s/.git/log/?qt=grep&q=%s>\n" % (git_url, name, ss.revision) # text += "\t<%sresults/%s/%s>\n" % (master_status.getBuildbotURL (), name, ss.revision) # Who's to blame?