Author: aidan Date: Wed Aug 5 15:01:33 2009 New Revision: 801250 URL: http://svn.apache.org/viewvc?rev=801250&view=rev Log: Add jira status to comits to review
Modified: qpid/trunk/qpid/review/agenda.py qpid/trunk/qpid/review/svnlog2wiki.xsl Modified: qpid/trunk/qpid/review/agenda.py URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/review/agenda.py?rev=801250&r1=801249&r2=801250&view=diff ============================================================================== --- qpid/trunk/qpid/review/agenda.py (original) +++ qpid/trunk/qpid/review/agenda.py Wed Aug 5 15:01:33 2009 @@ -21,17 +21,36 @@ import sys, re from popen2 import popen2, popen3 from optparse import OptionParser +from xml.dom.minidom import parse, parseString prereqs = ["tr", "svn", "xsltproc", "sed", "grep", "wget"] -svncmd = "svn log https://svn.apache.org/repos/asf/incubator/qpid --xml -r %s:HEAD | tr '\\n\\r|' ' -' | xsltproc svnlog2wiki.xsl - | grep r | sed -e 's/^ *//' | sed -e 's/\\(QPID-[0-9]*\\)/\\[\\1 | https:\\/\\/issues.apache.org\\/jira\\/browse\\/\\1 \]/g'" +svncmd = "svn log https://svn.apache.org/repos/asf/qpid/trunk/qpid/java --xml -r %s:HEAD | tr '\\n\\r|' ' -' | xsltproc svnlog2wiki.xsl - | grep r | sed -e 's/^ *//' | sed -e 's/\\(QPID-[0-9]*\\)/\\[\\1 | https:\\/\\/issues.apache.org\\/jira\\/browse\\/\\1 \]/g'" jiracmd = "wget -q -O - http://issues.apache.org/jira/sr/jira.issueviews:searchrequest-xml/12312564/SearchRequest-12312564.xml?tempMax=1000 | tr '[]|' '()-' | xsltproc jiraRSS2wiki.xsl - | grep '|' | sed -e 's/^ *//'" def get_commits(revision): (stdout, stdin) = popen2(svncmd % revision) - return stdout.read() + return add_jira_status(stdout.read()) + +def add_jira_status(commits): + commit_lines = commits.split("\n") + new_commits = [] + for commit in commit_lines: + if re.match(".*https://issues.apache.org/.*", commit): + jira = re.findall("QPID-[0-9]*", commit)[0] + jira_xml_url = "http://issues.apache.org/jira/si/jira.issueviews:issue-xml/%s/%s.xml" % (jira, jira) + (stdout, stdin) = popen2("wget -q -O - %s" % jira_xml_url) + + jira_dom = parse(stdout) + status = jira_dom.getElementsByTagName("status")[0] + new_commits.append("%s %s | " % (commit, status.lastChild.data)) + else: + new_commits.append(commit) + + return "\n".join(new_commits) + def get_jiras(): (stdout, stdin) = popen2(jiracmd) Modified: qpid/trunk/qpid/review/svnlog2wiki.xsl URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/review/svnlog2wiki.xsl?rev=801250&r1=801249&r2=801250&view=diff ============================================================================== --- qpid/trunk/qpid/review/svnlog2wiki.xsl (original) +++ qpid/trunk/qpid/review/svnlog2wiki.xsl Wed Aug 5 15:01:33 2009 @@ -22,7 +22,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"></xsl:output> <xsl:template match="/"> -|| revision || committer || date || comment || review notes || +|| revision || committer || date || comment || review notes || jira status || <xsl:apply-templates select="log/logentry"></xsl:apply-templates> </xsl:template> <xsl:template match="logentry"> --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org