| svn2cl - create a ChangeLog from a subversion log |
| |
| Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Arthur de Jong |
| |
| Redistribution and use in source and binary forms, with or without |
| modification, are permitted provided that the following conditions |
| are met: |
| 1. Redistributions of source code must retain the above copyright |
| notice, this list of conditions and the following disclaimer. |
| 2. Redistributions in binary form must reproduce the above copyright |
| notice, this list of conditions and the following disclaimer in |
| the documentation and/or other materials provided with the |
| distribution. |
| 3. The name of the author may not be used to endorse or promote |
| products derived from this software without specific prior |
| written permission. |
| |
| THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
| DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
| GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER |
| IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| |
| |
| INTRODUCTION |
| ============ |
| |
| svn2cl is a simple xsl transformation and shell script wrapper for generating |
| a classic GNU-style ChangeLog from a subversion repository log. It is made |
| from several changelog-like scripts using common xslt constructs found in |
| different places. |
| |
| I made it because it was the only thing that I missed from cvs after I |
| converted a repository to subversion. I used cvs2cl before. |
| |
| INSTALLING SVN2CL |
| ================= |
| |
| Just unpack the tarball in some directory (e.g. /opt/svn2cl-0.12) |
| and symlink the svn2cl.sh script in your path somewhere (e.g. |
| ln -s /opt/svn2cl-0.12/svn2cl.sh /usr/local/bin/svn2cl). |
| |
| Note: Be sure to keep the svn2cl.xsl file in the same directory as the |
| svn2cl.sh script as the script looks for it there (symlinking is ok). |
| |
| USING SVN2CL IN AN ANT TARGET |
| ============================= |
| |
| It is possible to use svn2cl in an ant target with a snippet like: |
| |
| <tempfile property="info.xml.file" |
| prefix="info-" suffix=".xml" |
| destdir="${java.io.tmpdir}" /> |
| <java classname="org.tmatesoft.svn.cli.SVN" dir="${basedir}" |
| fork="true" output="${info.xml.file}" |
| classpathref="javasvn-classpath"> |
| <arg line="log --xml --verbose" /> |
| </java> |
| <xslt in="${info.xml.file}" out="ChangeLog" style="svn2cl.xsl"> |
| <param name="strip-prefix" expression="trunk/myProject/" /> |
| <param name="groupbyday" expression="yes" /> |
| <param name="separate-daylogs" expression="yes" /> |
| <param name="include-rev" expression="yes" /> |
| <param name="breakbeforemsg" expression="yes" /> |
| <param name="reparagraph" expression="yes" /> |
| </xslt> |
| <delete file="${info.xml.file}" /> |
| |
| Although it seems that currently the xslt processor that is used by ant |
| inserts newlines in places it shouldn't. This can be worked around by |
| replacing &newl; throughout the xsl files by 
. |
| |
| WINDOWS PORT |
| ============ |
| |
| A VBScript port of the wrapper shell script has been made by Iwasa Kazmi, |
| which allows running svn2cl on Microsoft Windows without a POSIX compatibility |
| layer and xsltproc. More information is available here: |
| http://www.cosmo-system.jp/iwasa/svn2clwin.html |
| |
| NOTES |
| ===== |
| |
| The log is performed on the current directory '.' unless you specify URL |
| and/or PATH parameters. Before generating the ChangeLog you may want to make |
| your working copy up to date with 'svn update' (non-recursive update will do) |
| or pass --revision HEAD:1 as a parameter to svn2cl.sh. |
| |
| There will not be very frequent new releases but if there are they can be |
| found at: http://arthurdejong.org/svn2cl/ |
| |
| FEEDBACK AND BUG REPORTS |
| ======================== |
| |
| If you have any questions about svn2cl or would like to report a bug please |
| send an email to Arthur de Jong <arthur@arthurdejong.org>. |