Permalink
Browse files

-- fixed some internal links

-- changeset-tab will now handle multiple revisions per file
  • Loading branch information...
1 parent 4783c21 commit 19db3fcd63b5d6f4e384306fe0f3e5066af0ad19 unknown committed Mar 17, 2010
@@ -41,6 +41,9 @@
<xsl:output method="html"/>
<xsl:variable name="modification.list" select="cruisecontrol/modifications/modification"/>
<xsl:variable name="urlroot" select='"/cruisecontrol/buildresults/"'/>
+ <xsl:variable name="currentlog"
+ select="substring(cruisecontrol/info/property[@name='logfile']/@value, 0, string-length(cruisecontrol/info/property[@name='logfile']/@value) - 3)" />
+
<xsl:key name="revkeys" match="cruisecontrol/modifications/modification" use="revision" />
<xsl:template match="/" mode="modifications">
@@ -288,7 +291,7 @@
<xsl:value-of select="'/'"/>
</xsl:if>
- <a href="?tab=changeset#{file/filename}">
+ <a href="?log={$currentlog}&amp;tab=changeset#{file/filename}.r{revision}">
<xsl:value-of select="file/filename"/>
</a>
</td>
@@ -39,7 +39,9 @@
<xsl:output method="html"/>
<xsl:variable name="project.name" select="/cruisecontrol/info/property[@name='projectname']/@value" />
-
+ <xsl:variable name="currentlog"
+ select="substring(cruisecontrol/info/property[@name='logfile']/@value, 0, string-length(cruisecontrol/info/property[@name='logfile']/@value) - 3)" />
+
<xsl:template match="checkstyle" mode="phpcs-list">
<p/>
<table class="result">
@@ -75,7 +77,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <a class="stealth" href="?tab=phpcs#a{position()}">
+ <a class="stealth" href="?log={$currentlog}&amp;tab=phpcs#a{position()}">
<xsl:value-of select="@name"/>
</a>
</td>
@@ -39,7 +39,9 @@
<xsl:output method="html"/>
<xsl:variable name="project.name" select="/cruisecontrol/info/property[@name='projectname']/@value" />
-
+ <xsl:variable name="currentlog"
+ select="substring(cruisecontrol/info/property[@name='logfile']/@value, 0, string-length(cruisecontrol/info/property[@name='logfile']/@value) - 3)" />
+
<xsl:template match="pmd" mode="phpunit-pmd-list">
<p/>
<table class="result">
@@ -74,7 +76,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <a class="stealth" href="?tab=phpmd#a{position()}">
+ <a class="stealth" href="?log={$currentlog}&amp;tab=phpmd#a{position()}">
<xsl:value-of select="@name"/>
</a>
</td>
View
@@ -1,11 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="diffs" default="run">
<path id="build.classpath">
- <pathelement path="${env.CLASSPATH}"/>
<pathelement location="/opt/cruisecontrol/apache-ant-1.7.0/lib/xmltask.jar"/>
</path>
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" classpathref="build.classpath" />
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties">
+ <classpath>
+ <pathelement location="/opt/cruisecontrol/apache-ant-1.7.0/lib/ant-contrib-1.0b3.jar"/>
+ </classpath>
+ </taskdef>
+
+
<target name="run">
<exec executable="mkdir">
<arg line="${logdir}/${cctimestamp}/diff"/>
@@ -14,20 +20,35 @@
<call path="/cruisecontrol/modifications/modification">
<param name="file" path="file/filename/text()"/>
<param name="rev" path="file/revision/text()"/>
+ <param name="action" path="file/@action"/>
<actions>
<exec executable="mkdir">
<arg line="-p ${logdir}/${cctimestamp}/diff@{file}"/>
</exec>
- <exec executable="svn" output="${logdir}/${cctimestamp}/diff@{file}.diff">
- <arg line="diff -c@{rev} ${svn}@{file}"/>
- </exec>
- <exec executable="pygmentize">
- <arg line="-f html -l diff -O full,style=trac -o ${logdir}/${cctimestamp}/diff@{file}.html
- ${logdir}/${cctimestamp}/diff@{file}.diff"/>
- </exec>
<exec executable="rmdir">
<arg line="${logdir}/${cctimestamp}/diff@{file}"/>
</exec>
+ <if>
+ <equals arg1="@{action}" arg2="added" />
+ <then>
+ <exec executable="svn" output="${logdir}/${cctimestamp}/diff@{file}">
+ <arg line="cat -r@{rev} ${svn}@{file}"/>
+ </exec>
+ <exec executable="pygmentize">
+ <arg line="-f html -O full,style=trac -o ${logdir}/${cctimestamp}/diff@{file}.r@{rev}.html
+ ${logdir}/${cctimestamp}/diff@{file}"/>
+ </exec>
+ </then>
+ <else>
+ <exec executable="svn" output="${logdir}/${cctimestamp}/diff@{file}.r@{rev}.diff">
+ <arg line="diff -c@{rev} ${svn}@{file}"/>
+ </exec>
+ <exec executable="pygmentize">
+ <arg line="-f html -l diff -O full,style=trac -o ${logdir}/${cctimestamp}/diff@{file}.r@{rev}.html
+ ${logdir}/${cctimestamp}/diff@{file}.r@{rev}.diff"/>
+ </exec>
+ </else>
+ </if>
</actions>
</call>
</xmltask>

0 comments on commit 19db3fc

Please sign in to comment.