Author: thorsten
Date: Sun Jul 23 16:26:19 2006
New Revision: 424855
URL: http://svn.apache.org/viewvc?rev=424855&view=rev
Log:
Adding support for svn log files to the project plugin. This work is based on
the svn support which we have over in Lenya. The biggest problem with the lenya
way was till now that we had one big log file that included 4 years of commits
and building the file took more then 30 min. To overcome this problem I
extended the project plugin with svn log processing which gives handy ways of
creating smaller files and have a per month view of the svn changes.
Added:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/first-last-revision.xsl
(with props)
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-log.xsl
(with props)
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-changes.xsl
(with props)
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-revision.xsl
(with props)
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/svn-log/
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/svn-log/log.svn.xml
(with props)
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/svnHelper.xmap
(with props)
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/forrest.properties.xml
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/locationmap.xml
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/locationmap.xml
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/xdocs/index.xml
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/status.xml
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/forrest.properties.xml
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/forrest.properties.xml?rev=424855&r1=424854&r2=424855&view=diff
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/forrest.properties.xml
(original)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/forrest.properties.xml
Sun Jul 23 16:26:19 2006
@@ -31,4 +31,6 @@
<!-- Indicate if the committers list should be included. Values are true
or false. -->
<property name="projectInfo.changes.includeCommitterList" value="false"/>
+
+ <property name="projectInfo.svn.ext" value=".svn.xml"/>
</properties>
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap?rev=424855&r1=424854&r2=424855&view=diff
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap
(original)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/input.xmap
Sun Jul 23 16:26:19 2006
@@ -245,5 +245,10 @@
</map:match>
</map:pipeline>
+ <map:pipeline>
+ <!-- svnHelper -->
+ <map:mount uri-prefix="" src="svnHelper.xmap" check-reload="yes"
+ pass-through="true" />
+ </map:pipeline>
</map:pipelines>
</map:sitemap>
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/locationmap.xml
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/locationmap.xml?rev=424855&r1=424854&r2=424855&view=diff
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/locationmap.xml
(original)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/locationmap.xml
Sun Jul 23 16:26:19 2006
@@ -48,5 +48,17 @@
<match pattern="projectInfo.transform.*.*">
<location src="resources/stylesheets/{1}-to-{2}.xsl"/>
</match>
+
+ <match pattern="project.svn.url">
+ <location src="http://svn.apache.org/repos/asf/forrest" />
+ </match>
+
+ <match pattern="projectInfo.svn.log.dir">
+ <location src="{project:content}svn-log/" />
+ </match>
+
+ <match pattern="projectInfo.svn.mapper">
+ <location src="{project:content}path-to-context.xml" />
+ </match>
</locator>
</locationmap>
Added:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/first-last-revision.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/first-last-revision.xsl?rev=424855&view=auto
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/first-last-revision.xsl
(added)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/first-last-revision.xsl
Sun Jul 23 16:26:19 2006
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:template match="/">
+ <log>
+ <xsl:apply-templates/>
+ </log>
+ </xsl:template>
+ <xsl:template match="release">
+ <changes release="[EMAIL PROTECTED]">
+ <revision last="{revision[last()]/@id}" first="{revision[1]/@id}"/>
+ </changes>
+ </xsl:template>
+</xsl:stylesheet>
Propchange:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/first-last-revision.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Added:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-log.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-log.xsl?rev=424855&view=auto
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-log.xsl
(added)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-log.xsl
Sun Jul 23 16:26:19 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="url"/>
+ <xsl:param name="test"/>
+ <!--test: <xsl:value-of select="$test"/>-->
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </xsl:template>
+ <xsl:template match="changes">svn log -r <xsl:value-of
select="revision/@first"/>:<xsl:value-of select="revision/@last"/> --xml -v
<xsl:value-of select="$url"/> > <xsl:value-of select="@release"/>.svn.xml
+</xsl:template>
+</xsl:stylesheet>
Propchange:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-log.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Added:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-changes.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-changes.xsl?rev=424855&view=auto
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-changes.xsl
(added)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-changes.xsl
Sun Jul 23 16:26:19 2006
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:key name="month" match="logentry" use="substring(date, 1, 7)"/>
+ <xsl:variable name="mapper" select="/svn/paths"/>
+ <xsl:template match="/">
+ <status>
+ <xsl:apply-templates select="svn/log"/>
+ </status>
+ </xsl:template>
+ <xsl:template match="log">
+ <changes>
+ <xsl:for-each
+
select="//logentry[generate-id(.)=generate-id(key('month',substring(date, 1,
7)))]">
+ <xsl:sort select="date" order="descending"/>
+ <release version="{substring(date, 1, 7)}">
+ <xsl:for-each select="key('month',substring(date, 1, 7))">
+ <xsl:apply-templates select="."/>
+ </xsl:for-each>
+ </release>
+ </xsl:for-each>
+ </changes>
+ </xsl:template>
+ <xsl:template match="logentry">
+ <action> <xsl:attribute name="dev"><xsl:value-of
+ select="author"/></xsl:attribute> <xsl:variable name="type">
<xsl:choose>
+ <xsl:when test="contains(paths/path[1]/@action, 'A')">add</xsl:when>
+ <xsl:when test="contains(paths/path[1]/@action, 'M')">update</xsl:when>
+ <xsl:when test="contains(paths/path[1]/@action, 'R')">update</xsl:when>
+ <xsl:when test="contains(paths/path[1]/@action, 'D')">remove</xsl:when>
+ </xsl:choose> </xsl:variable> <xsl:attribute name="type"><xsl:value-of
+ select="$type"/></xsl:attribute> <xsl:variable name="version">
+ <xsl:call-template name="context"> <xsl:with-param name="path">
+ <xsl:value-of select="paths/path[1]"/> </xsl:with-param>
+ </xsl:call-template> </xsl:variable> <xsl:variable name="path">
+ <xsl:value-of select="paths/path[1]"/> </xsl:variable> <xsl:attribute
+ name="context"> <xsl:value-of select="$version"/>
+ </xsl:attribute>[<xsl:value-of select="$version"/>] <xsl:value-of
+ select="msg"/><xsl:text> </xsl:text><link
+ href="http://svn.apache.org/[EMAIL
PROTECTED]&view=rev">Diff</link><xsl:text>
+ </xsl:text> </action>
+ </xsl:template>
+ <xsl:template name="context">
+ <xsl:param name="path"/>
+ <xsl:choose>
+ <xsl:when test="$mapper//path[starts-with($path,text())]">
+ <xsl:value-of
+ select="$mapper//path[starts-with($path,text())]/@context"/>
+ </xsl:when>
+ <xsl:otherwise>No context matched</xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
Propchange:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-changes.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Added:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-revision.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-revision.xsl?rev=424855&view=auto
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-revision.xsl
(added)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-revision.xsl
Sun Jul 23 16:26:19 2006
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:key name="month" match="logentry" use="substring(date, 1, 7)"/>
+ <xsl:template match="/">
+ <status>
+ <xsl:apply-templates select="log"/>
+ </status>
+ </xsl:template>
+ <xsl:template match="log">
+ <changes>
+ <xsl:for-each
+
select="//logentry[generate-id(.)=generate-id(key('month',substring(date, 1,
7)))]">
+ <xsl:sort select="date" order="descending"/>
+ <release version="{substring(date, 1, 7)}">
+ <xsl:for-each select="key('month',substring(date, 1, 7))">
+ <xsl:sort select="@revision"/>
+ <revision id="[EMAIL PROTECTED]"/>
+ </xsl:for-each>
+ </release>
+ </xsl:for-each>
+ </changes>
+ </xsl:template>
+</xsl:stylesheet>
Propchange:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/svn-to-revision.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/locationmap.xml
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/locationmap.xml?rev=424855&r1=424854&r2=424855&view=diff
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/locationmap.xml
(original)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/src/documentation/content/locationmap.xml
Sun Jul 23 16:26:19 2006
@@ -41,5 +41,9 @@
<match pattern="project.descriptor.forrest">
<location
src="http://svn.apache.org/repos/asf/forrest/trunk/site-author/content/doap.xml"/>
</match>
+
+ <match pattern="project.svn.url">
+ <location
src="http://svn.apache.org/repos/asf/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo"
/>
+ </match>
</locator>
</locationmap>