svn2cl-0.14/0000755000175000001440000000000012214700333007635 500000000000000svn2cl-0.14/NEWS0000644000175000001440000001020012214677472010266 00000000000000changes from 0.13 to 0.14 ------------------------- * fix a bug in the handling of the --ticket-link option (thanks Gaute Lote) * expose the --ticket-prefix option in the shell script wrapper (thanks Gaute Lote) changes from 0.12 to 0.13 ------------------------- * add a --ticket-link option for the HTML output that replaces anything that looks like a ticket reference (e.g. #123) with a link (thanks Neil Whitworth) * properly quote $0 in shell script (thanks Vincent Lefevre) * also pass through -g, --use-merge-history, -c, --change, -l, --trust-server-cert and --config-option options to svn log command changes from 0.11 to 0.12 ------------------------- * fix line wrapping problem thanks to Peter Samuelson, Mike Hommey and others * run svn command to find repository location with --non-interactive and don't hide errors * perform URL highlighting (very basic) in the HTML output * some miscellaneous bugfixes and simplifications * correctly flag file additions changes from 0.10 to 0.11 ------------------------- * small portability improvements * fix for OpenBSD's ksh by Carlo Marcelo Arenas Belon changes from 0.9 to 0.10 ------------------------ * add an --include-actions option that adds action labels about file additions and removals * small fix for other XSLT processors * manual page improvement changes from 0.8 to 0.9 ----------------------- * ignore files outside the base directory if --strip-prefix is specified (the default with the wrapper shellscript) * add --ignore-message-starting option to ignore any log messages that start with the specified string changes from 0.7 to 0.8 ----------------------- * added --title option for setting html page title (thanks Matt Doar) * added --revision-link option to make the revision numbers in the html output link to some url * updated --break-before option to have an optional number of breaks * authors file format improvements (see manual) * fixes to the svn info command to guess working directory (thanks Iwasa Kazmi) * miscellaneous fixes (thanks Max Bane and Iwasa Kazmi) * document calling svn2cl from ant by Rob Moore * some wrapping fixes * fixes for having directories and/or repositories with spaces in them changes from 0.6 to 0.7 ----------------------- * performance improvements (svn2cl is about 40% faster when not using the --group-by-day option plus a couple of percent when using the --authors option) * path to strip from file names is now automatically determined (works with svn>=1.3.0) * colon separated authors file is now supported * html output improvements * added --reparagraph option that re-wraps text inside paragraphs * added --separate-daylogs option that inserts newlines between log messages when --group-by-day is used * manual page improvements changes from 0.5 to 0.6 ----------------------- * added --authors option to expand full author names (experimental, if anyone has a better performing implementation, please let me know) * added --break-before-msg option (based on a patch by Vincent Danen) * added another example to manual page (thanks to Bastian Kleineidam) * preserve line breaks in html output * output line breaks that are more likely to be correct on most platforms * updated svn2html.css to give ChangeLog.html a little nicer layout changes from 0.4 to 0.5 ----------------------- * preserve line breaks in svn log messages * added manual page for shellscript wrapper * wrapper script portability improvements * documentation and --help output fixes and improvements changes from 0.3 to 0.4 ----------------------- * added NEWS and TODO files * support for passing options to svn log command * preliminary support for generating an html version of the ChangeLog (copy css file manually) * switch encoding of generated files to utf-8 * better command option handling changes from 0.2 to 0.3 ----------------------- * added short equivalents for some commonly used command line options * write the changelog to a different file or to stdout changes from 0.1 to 0.2 ----------------------- * support grouping entries per day * support for adding revision numbers in the log * line length is configurable * a wrapper shell script svn2cl-0.14/TODO0000644000175000001440000000071110776151002010250 00000000000000* support more xslt processors * group changes per autor per day * svn2rss? * if an authors.xml file exists in the current directory automatically pick it up * improve performance of processing authors.xml * fix awk magic to not break with spaces in repository names * find better names for options * create backup of previous changelog file * support specifying multiple --ignore-message-starting options * svn2cl --strip-prefix=/ doesn't work as expected svn2cl-0.14/svn2cl.10000644000175000001440000002154412214677472011075 00000000000000.\" Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 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. .TH "svn2cl" "1" "Oct 2010" "Version 0.14" "User Commands" .nh .SH "NAME" svn2cl - Create a ChangeLog from a subversion log. .SH "SYNOPSIS" .B svn2cl .RI [ OPTION ]... .RI [ PATH ]... .SH "DESCRIPTION" \fBsvn2cl\fP generates a classic GNU-style ChangeLog from the log messages in a subversion repository. It acts as a wrapper around the '\fBsvn log\fP' command, parsing the XML output with an XSLT stylesheet. Alternatively it can generate HTML output intended for use with the \fBsvn2html.css\fP style sheet that comes with \fBsvn2cl\fP. In addition to its own options, it accepts and passes along most svn log options; see '\fBsvn help log\fP' for a list of those and their documentation. If PATH is not given, \fBsvn2cl\fP will run svn log on the current directory, so it should do the right thing when run from the top of a subversion checkout of the project. .TP \fB\-\-strip\-prefix\fR=\fINAME\fR Strip \fINAME\fR from the first part of all file names (e.g. project/trunk). By defaults the current path inside the repository is stripped. .TP \fB\-\-linelen\fR=\fINUM\fR Wrap lines at \fINUM\fR characters. By default, lines are wrapped at 75 characters. This option is ignored when the \-\-html option is specified. .TP \fB\-\-group\-by\-day\fR This option causes all commit messages to be grouped by day, as long as all the changes are by the same author. By default each message is listed separately with its own timestamp. .TP \fB\-\-separate\-daylogs\fR Include a blank line between log entries when they are grouped by day. Only useful with the \fB\-\-group\-by\-day\fR option. This option is ignored when the \-\-html option is specified, edit \fBsvn2html.css\fP to tune the layout. .TP \fB\-i\fR, \fB\-\-include\-rev\fR Include the subversion revision number in the ChangeLog. If the \-\-html option is specified this is implied, edit \fBsvn2html.css\fP to turn it off. .TP \fB\-a\fR, \fB\-\-include\-actions\fR Add action labels [ADD], [DEL] and [CPY] tags to files to show the operation that is performned on the files. .TP \fB\-\-break\-before\-msg\fR[=\fINUM\fR] Add a line break (or multiple line breadks) between the paths and the log message. If the \-\-html option is specified this option is ignored, edit \fBsvn2html.css\fP to set spacing. .TP \fB\-\-reparagraph\fR Newlines inside paragraphs are ignored and paragraphs are re-wrapped. Paragraphs are separated by empty lines. .TP \fB\-\-title\fR=\fINAME\fR If outputting an HTML file the \fINAME\fR is used as the title. This option is ignored for normal text output. .TP \fB\-\-revision\-link\fR=\fINAME\fR This option is used to generate links from the revision numbers in the generated HTML file. If \fINAME\fR contains two hashes '\fB##\fP' that part will be replaced by the revision number, otherwise the revision number will be appended to \fINAME\fR. Only the first occurrence of '\fB##\fP' will be replaced. .br This option is ignored for normal text output. .TP \fB\-\-ticket\-link\fR=\fINAME\fR This option is used to generate links from references to tickets within the commit message in the generated HTML file. Anything that looks like a ticket reference (e.g. '\fB#foo\fP') will be replaced with a link to NAME with the ticket part ('\fBfoo\fP' in the example) appended. .br This option is ignored for normal text output. .TP \fB\-\-ticket\-prefix\fR=\fINAME\fR This option is used for finding ticket markers in the commit message (when the \fB\-\-ticket\-link\fR option is used). The default value is '\fB#\fP'. .br This option is ignored for normal text output. .TP \fB\-\-ignore\-message\-starting\fR=\fISTRING\fR Any log messages that start with the specified \fISTRING\fR are ignored and will not show up in the output. The STRING comparison is case sensitive. .TP \fB\-o\fR, \fB\-f\fR, \fB\-\-output\fR=\fIFILE\fR, \fB\-\-file\fR=\fIFILE\fR Output ChangeLog to \fIFILE\fR instead of the default \fBChangeLog\fP (or \fBChangeLog.html\fP for HTML output). .TP \fB\-\-stdout\fR Output ChangeLog to stdout instead of to a file. .TP \fB\-\-authors\fR=\fIFILE\fR The \fIFILE\fR is used to map author names as exported by svn to full names. See the section on AUTHORS FILES below for more information. .br Note that the \-\-authors option can have poor performance in some cases. .TP \fB\-\-html\fR Generate an HTML file containing a ChangeLog instead of the default text ChangeLog file. This feature is still experimental. The \fBsvn2html.css\fP file that is included in the distribution can be used to format the HTML. .TP \fB\-h\fR, \fB\-\-help\fR Show short summary of options. .TP \fB\-V\fR, \fB\-\-version\fR Show version of program. .PP Optional PATH arguments and the following options are passed directly to the '\fBsvn \-\-xml log\fP' command: \fB\-r\fR, \fB\-\-revision\fR, \fB\-\-targets\fR, \fB\-\-stop\-on\-copy\fR, \fB\-\-username\fR, \fB\-\-password\fR, \fB\-\-no\-auth\-cache\fR, \fB\-\-non\-interactive\fR, \fB\-\-config\-dir\fR and \fB\-\-limit\fR. .br See '\fBsvn help log\fP' for more information on these options. .SH "AUTHORS FILES" An authors file is basically an XML file that should look something like: .ft B Arthur de Jong <arthur@arthurdejong.org> .ft R .br svn2cl searches for tags with the specified uid attribute. The content from the author tag is substituted for the author name. The tag may also contain XML child tags which can be useful for embedding HTML into the result. For this to work namespace information should be included for HTML output: .ft B Arthur de Jong <arthur@arthurdejong.org> .ft R .br The svn2cl distribution contains a sample authors.xml file. As a bonus a plain text authors file that looks like the following is automatically converted to the XML representation: .ft B arthur:Arthur de Jong .ft R .SH "NOTES" Note that the default revison range for \fBsvn log\fP is BASE:1. This means that \fBsvn2cl\fP will not always include the most recent revisons of the repository. Either run '\fBsvn update\fP' before running \fBsvn2cl\fP or pass '\fB\-r HEAD:1\fP'. .SH "EXAMPLES" Run svn log recursively on the current directory and generate a text ChangeLog file in the current directory for the entire log history: .ft B svn2cl .ft R Output the changes from the last week, while including revision numbers in the ChangeLog: .ft B svn2cl \-i \-r "HEAD:{`date \-d '7 days ago' '+%F %T'`}" .ft R .br (actually subversion will include the first revision before the specified period) Generate an HTML changelog for svn://svn.example.com/project/trunk, removing "project/trunk" from the file names in the changelog. Group all commits per day into one ChangeLog entry and only include changes from 2005: .ft B svn2cl \-\-html \-\-strip\-prefix=project/trunk \-\-group\-by\-day \e \-r '{2006\-01\-01}:{2005\-01\-01}' \e svn://svn.example.com/project/trunk .ft R .SH "SEE ALSO" .BR '\fBsvn\ help\ log\fP' .SH "COPYRIGHT" Copyright \(co 2005, 2006, 2007, 2008, 2009, 2010, 2013 Arthur de Jong . .br This is free software; see the license for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. svn2cl-0.14/README0000644000175000001440000001021512214677472010455 00000000000000 svn2cl - create a ChangeLog from a subversion log Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 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.14) and symlink the svn2cl.sh script in your path somewhere (e.g. ln -s /opt/svn2cl-0.14/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: 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 svn2cl-users@lists.arthurdejong.org. svn2cl-0.14/authors.xml0000644000175000001440000000057411214550017011773 00000000000000 Arthur de Jong <arthur@arthurdejong.org> Who's this <nobody@example.com> Superman <root@localhost> svn2cl-0.14/ChangeLog0000644000175000001440000004053412214677472011356 000000000000002013-03-06 20:56 arthur * [r159] svn2cl.1, svn2cl.sh: also expose the --ticket-prefix option in the shell script wrapper (thanks Gaute Lote) 2013-03-06 20:40 arthur * [r158] svn2cl.sh: fix typo in handling of --ticket-link option (thanks Gaute Lote) 2011-03-27 17:30 arthur * [r148] svn2cl.xsl: fix typo 2010-10-23 11:59 arthur * [r146] ChangeLog, NEWS, README, svn2cl.1, svn2cl.sh, svn2cl.xsl, svn2html.xsl: get files ready for 0.13 release 2010-08-13 09:39 arthur * [r145] svn2cl.sh: also pass -g, --use-merge-history, -c, --change, -l, --trust-server-cert and --config-option to svn commands 2010-08-13 08:07 arthur * [r144] README: direct bugreports to the svn2cl-users mailing list 2010-08-13 07:24 arthur * [r143] svn2cl.xsl: fix typo in comment 2010-05-06 21:11 arthur * [r142] svn2cl.sh: properly quote $0 (thanks Vincent Lefevre) 2010-03-03 21:02 arthur * [r141] ChangeLog, svn2cl.1, svn2cl.sh, svn2html.xsl: implement ticket-highlighting with a --ticket-link option, based on a patch by Neil Whitworth 2010-03-03 20:55 arthur * [r140] svn2html.xsl: switch to a mechanism to more easily perform more message log highlighting 2010-03-03 19:54 arthur * [r139] svn2html.xsl: also perform correct line-highlighing for last line 2009-11-22 12:48 arthur * [r138] svn2html.xsl: call urlstolinks on every line separately because we cannot store tags inside a variable 2009-10-07 20:36 arthur * [r136] ChangeLog, NEWS, README, svn2cl.1, svn2cl.sh, svn2cl.xsl, svn2html.xsl: get files ready for 0.12 release 2009-10-07 20:31 arthur * [r135] svn2html.css: trim trailing whitespace 2009-10-07 20:18 arthur * [r134] svn2cl.xsl, svn2html.xsl: fix line wrapping problem thanks to Peter Samuelson , Mike Hommey and others (see http://bugs.debian.org/546990) 2009-06-12 22:00 arthur * [r133] README, authors.xml, svn2cl.1, svn2html.xsl: replace references to ch.tudelft.nl with arthurdejong.org 2009-02-02 21:20 arthur * [r132] svn2cl.xsl: another simplification to get path stripping compacter 2009-02-02 21:00 arthur * [r131] svn2cl.xsl: simplification in printing path names 2009-02-02 20:33 arthur * [r130] svn2cl.xsl: correctly flag additions 2009-01-13 22:27 arthur * [r129] svn2cl.xsl, svn2html.xsl: properly get the previous sibling fixing a problem when --group-by-day and --ignore-message-starting were used 2009-01-13 21:45 arthur * [r128] svn2html.xsl: perform URL highlighting (very basic) 2009-01-13 21:44 arthur * [r127] svn2cl.sh: run svn info (not svn log) with --non-interactive and don't hide errors 2008-12-21 15:41 arthur * [r125] ChangeLog, NEWS, svn2cl.1, svn2cl.sh, svn2cl.xsl, svn2html.xsl: get files ready for 0.11 release 2008-09-22 21:34 arthur * [r124] svn2cl.sh: fix for OpenBSD's ksh by Carlo Marcelo Arenas Belon 2008-06-03 19:03 arthur * [r123] svn2cl.sh: make awk command configurable 2008-06-03 19:02 arthur * [r122] svn2cl.sh: don't use GNU extensions to awk syntax 2008-04-06 13:37 arthur * [r120] ChangeLog, NEWS, README, TODO, svn2cl.1, svn2cl.sh, svn2cl.xsl, svn2html.xsl: get files ready for 0.10 release 2008-04-06 13:27 arthur * [r119] svn2cl.1: include not about default revision range that is used 2008-04-06 12:25 arthur * [r118] svn2cl.1, svn2cl.sh: make -a a short equivalent for --include-actions 2008-01-02 21:55 arthur * [r117] svn2cl.xsl, svn2html.xsl: escape the newline character reference in the entity definition of newl to perform the normalization at the right time (see http://mail-archives.apache.org/mod_mbox/xerces-c-dev/200010.mbox/%3COF274C146F.60A7FFAF-ON8525696D.0065F984@lotus.com%3E) 2007-12-07 13:57 arthur * [r116] README, svn2cl.1, svn2cl.sh: don't use backtick as quote character 2007-10-09 20:00 arthur * [r115] svn2cl.xsl: do not present file list if no files would be listed 2007-09-25 20:03 arthur * [r114] svn2cl.1, svn2cl.sh, svn2cl.xsl: add an --include-actions option that adds action labels about file additions and removals to the files in the log 2007-04-08 12:47 arthur * [r112] ChangeLog, NEWS, README, svn2cl.1, svn2cl.sh, svn2cl.xsl, svn2html.xsl: get files ready for 0.9 release 2007-04-08 12:34 arthur * [r111] svn2cl.1: unescape some hyphens that are not minus symbols 2007-03-31 13:45 arthur * [r110] svn2cl.xsl: completely ignore files that do not start with the specified prefix if --strip-prefix is specified 2007-03-31 10:47 arthur * [r109] svn2cl.1, svn2cl.sh, svn2cl.xsl, svn2html.xsl: add an option --ignore-message-starting to ignore any log messages that start with the specified string 2006-10-19 19:18 arthur * [r108] svn2cl.1: change hyphens into minus symbols (thanks lintian) 2006-10-18 21:38 arthur * [r106] NEWS: fix news 2006-10-18 21:38 arthur * [r105] ChangeLog, NEWS, README, TODO, svn2cl.1, svn2cl.sh, svn2cl.xsl, svn2html.xsl: get files ready for 0.8 release 2006-10-18 21:27 arthur * [r104] README: add note about VBScript port by Iwasa Kazmi 2006-10-18 21:23 arthur * [r103] README: add ant section based on snippet by Rob Moore 2006-09-03 12:11 arthur * [r102] svn2cl.xsl: fix another wrapping bug regarding spaces at the edge of the wrapped text 2006-09-03 11:44 arthur * [r101] svn2cl.xsl: fix bug in wrapping really long words 2006-09-03 11:19 arthur * [r100] svn2cl.sh: fix for having directories and/or repositories with spaces in them 2006-08-26 13:04 arthur * [r99] svn2cl.1, svn2cl.sh, svn2cl.xsl: accept a numeric paramter to --break-before-msg to specify the number of newlines that should be inserted 2006-08-26 13:02 arthur * [r98] svn2cl.xsl, svn2html.xsl: always include a space before /> 2006-08-26 10:26 arthur * [r97] svn2html.xsl: fix note with reference to svn2cl.xsl 2006-08-26 09:33 arthur * [r96] svn2cl.xsl, svn2html.xsl: fix ENTITY definitions in DOCTYPE, fix by Iwasa Kazmi 2006-08-26 09:28 arthur * [r95] svn2cl.sh: explicitly set locale for svn info command to have predictable output, fix by Iwasa Kazmi 2006-08-12 05:53 arthur * [r94] svn2cl.sh: fix for running svn2cl.sh in a directory with a space in it, patch by Max Bane 2006-07-02 21:21 arthur * [r93] svn2cl.xsl: fix for problem when not using authors file 2006-06-27 20:11 arthur * [r92] svn2cl.sh: build the svn info command more or less the same way as the svn log command (but don't pass all the options) 2006-06-27 19:56 arthur * [r91] svn2cl.1: split authors file info to a separate section 2006-06-27 19:52 arthur * [r90] svn2cl.1: capitalize HTML, some spelling fixes and some wording changes 2006-06-15 20:43 arthur * [r89] authors.xml, svn2cl.1, svn2cl.xsl: also copy xml content from authors file (this change also seems to bring a small performance gain) 2006-06-14 20:51 arthur * [r88] svn2cl.1, svn2cl.sh, svn2html.xsl: implement --revision-link option to make the revision numbers in the html output linkable to some url 2006-06-14 19:03 arthur * [r87] svn2cl.1, svn2cl.sh, svn2html.xsl: implement --title option for setting a title in the html page, based on a patch by Matt Doar 2006-06-06 21:44 arthur * [r86] svn2cl.sh: also pass --nowrite, --nomkdir and --nonet options to xsltproc command 2006-04-10 19:06 arthur * [r84] ChangeLog, NEWS, README, TODO, svn2cl.1, svn2cl.sh, svn2html.xsl: get files ready for 0.7 release 2006-04-10 18:47 arthur * [r83] svn2cl.1, svn2html.xsl: make --reparagraph option also work for HTML output 2006-04-09 21:33 arthur * [r82] svn2cl.1: add --html compatibility information to --separate-daylogs and --repragraph options 2006-04-09 21:24 arthur * [r81] svn2cl.1, svn2cl.sh, svn2cl.xsl: implement --separate-daylogs option to put a newline between log entries when --group-by-day is used 2006-04-09 20:41 arthur * [r80] svn2cl.sh: fallback to old behaviour of stripping prefix if svn info does not provide the necessary info 2006-04-09 20:32 arthur * [r79] svn2cl.1, svn2cl.sh, svn2cl.xsl: implement --repragraph option that rewraps text inside paragraphs 2006-04-02 21:10 arthur * [r78] svn2cl.1: clearly state which options do not work with --html 2006-04-02 20:43 arthur * [r77] svn2cl.xsl: typo fix 2006-04-02 09:08 arthur * [r76] svn2cl.xsl, svn2html.xsl: split out group-by-day code to separate code block and reduce number of xsl:apply-templates calls 2006-04-02 08:46 arthur * [r75] svn2cl.xsl: typo author-lookup fix for r71 plus some readability improvements to code doing the author lookup 2006-04-01 21:37 arthur * [r74] svn2html.xsl: give template a more logical name 2006-04-01 21:34 arthur * [r73] svn2cl.sh: ensure that stringparam arguments are always properly quoted 2006-04-01 21:31 arthur * [r72] svn2cl.1, svn2cl.sh: svn option is called --targets (with the s) and some other small usage fixes 2006-03-27 20:42 arthur * [r71] svn2cl.xsl: use xsl:key when looking up author names in authors.xml file (idea from http://www-128.ibm.com/developerworks/library/x-xsltip.html) (improving performance around 10-20% with large logs) 2006-03-24 17:33 arthur * [r70] svn2cl.1, svn2cl.sh: determin prefix to strip from output of svn info command (using awk) 2006-03-21 21:25 arthur * [r69] svn2cl.sh: add comment and ensure that script returns 0 on successful exit 2006-03-21 20:48 arthur * [r68] svn2cl.1, svn2cl.sh: implement automatically converting authors file to xml if it is in colon separated format, based on a patch by Olivier Blin 2006-03-17 16:22 arthur * [r67] svn2html.css: reduce w3c css checker warnings and slightly improve layout, making anchors stand out a little less 2006-03-17 16:19 arthur * [r66] svn2html.xsl: made anchors and links for each revision based on a patch by Tobias Schäfer 2006-02-11 15:29 arthur * [r64] ChangeLog, NEWS, README, TODO, svn2cl.1, svn2cl.sh: get files ready for 0.6 release 2006-02-11 15:17 arthur * [r63] svn2html.xsl: include common formatting templates from svn2cl.xsl 2006-02-11 15:03 arthur * [r62] svn2cl.xsl, svn2html.xsl: use named entity references for newlines everywhere and put entity definitions in correct DOCTYPE 2006-02-11 14:41 arthur * [r61] svn2html.css: improve style of generated html a little 2006-02-11 14:35 arthur * [r60] svn2cl.xsl, svn2html.xsl: trim spaces from author names 2006-02-11 14:34 arthur * [r59] authors.xml: add sample authors.xml file 2006-02-11 14:33 arthur * [r58] svn2html.xsl: added footer to generated html report with a link to svn2cl homepage 2006-02-01 21:22 arthur * [r57] svn2cl.sh: make option removal expression consistent for all options (prevent copy-paste errors) 2006-01-27 16:31 arthur * [r56] svn2cl.1, svn2cl.sh, svn2cl.xsl: add --break-before-msg option, based on a patch by Vincent Danen 2006-01-27 15:44 arthur * [r55] svn2cl.1: clarify comment about date period 2006-01-27 15:38 arthur * [r54] svn2cl.1: add extra example usage to generate changelog for last week (based on a patch by Bastian Kleineidam to implement a --date option) 2006-01-04 19:03 arthur * [r53] svn2cl.1, svn2cl.sh, svn2cl.xsl, svn2html.xsl: include --authors option to specify an athors file that maps uids to author names 2005-12-27 15:45 arthur * [r52] svn2html.xsl: replace line breaks in log message with
tags, thanks to Tobias Schäfer for the code 2005-12-27 15:23 arthur * [r51] svn2html.css: add commented out code to put change message on separate line 2005-12-27 11:15 arthur * [r50] svn2cl.xsl: strim trailing and double spaces and add as newline instead of , thanks to Tobias Schäfer 2005-12-25 22:57 arthur * [r48] NEWS, README, TODO, svn2cl.1, svn2cl.sh: get files ready for release 0.5 2005-12-25 17:12 arthur * [r47] svn2cl.sh: shell portability improvements to get it working on all tested shell/sed combinations, thanks to Jörg Sommer for pointing this out 2005-12-25 17:05 arthur * [r46] NEWS: fix typo 2005-12-25 17:03 arthur * [r45] README: clarify usage information to include possibility to specify location of repository 2005-12-25 14:44 arthur * [r44] svn2cl.1: add manual page, some parts taken from manual page provided by Russ Allbery 2005-12-25 13:56 arthur * [r43] svn2cl.xsl: preserve line breaks in log messages, trimming all trailing and beginning line breaks 2005-12-25 13:10 arthur * [r42] svn2cl.sh: clear up usage string, thanks to Tobias Schäfer 2005-12-25 13:03 arthur * [r41] NEWS, README: apply typo fixing and documentation improving patch by Tobias Schäfer 2005-12-17 20:20 arthur * [r40] svn2cl.sh: include --html option in --help output 2005-12-04 21:26 arthur * [r38] .: move directory back 2005-12-04 21:26 arthur * [r37] .: make release 0.4 2005-12-04 21:23 arthur * [r36] NEWS: add NEWS file 2005-12-04 21:21 arthur * [r35] TODO: include TODO file 2005-12-04 21:09 arthur * [r34] README, svn2cl.sh: bump version number to 0.4 2005-12-04 21:00 arthur * [r33] svn2cl.sh, svn2html.css, svn2html.xsl: add html stylesheet and css and --help option to output html 2005-12-04 20:50 arthur * [r32] svn2cl.sh: ensure that required arguments to options are specified (avoid silent failure) 2005-12-04 20:30 arthur * [r31] svn2cl.sh: implement passing options to the svn log command, rename -r option (--include-rev) to -i 2005-12-04 20:27 arthur * [r30] svn2cl.sh: handle --option=arg options as well as --option arg 2005-12-04 20:25 arthur * [r29] svn2cl.sh: implement handling of -f and --file options 2005-12-03 12:55 arthur * [r28] svn2cl.xsl: move adding colon to path list one level up 2005-12-03 12:52 arthur * [r27] svn2cl.xsl: remove TODO section (is now in a separate file) 2005-12-03 12:52 arthur * [r26] svn2cl.xsl: ensure that we have a space everywhere before /> 2005-12-03 12:14 arthur * [r25] svn2cl.xsl: no need for xhtml namespace declaration 2005-12-02 16:51 arthur * [r24] svn2cl.xsl: explain why we use ++ for options 2005-12-02 16:34 arthur * [r23] svn2cl.xsl: switch ChangeLog encoding to utf-8 2005-09-13 19:27 arthur * [r21] README, svn2cl.sh: bump version number to 0.3 2005-09-09 19:04 arthur * [r20] svn2cl.sh: implement writing ChangeLog to a different file or stdout 2005-08-16 18:24 arthur * [r19] svn2cl.sh: make -r an alias for --include-rev 2005-07-31 16:37 arthur * [r17] README: add simple installation instructions 2005-07-31 16:33 arthur * [r16] README: add very basic README 2005-07-31 16:08 arthur * [r15] svn2cl.sh: use basename when printing program name 2005-07-31 16:00 arthur * [r14] svn2cl.sh: add code for finding the location of the .xsl file relative to the installed location of the script following symlinks 2005-07-31 15:26 arthur * [r13] svn2cl.sh: add proper command line handling to shell script 2005-07-31 14:51 arthur * [r12] svn2cl.sh: add simple shell script calling xsltproc 2005-07-31 14:42 arthur * [r11] svn2cl.xsl: add an include-rev option to also list revision number 2005-07-31 14:41 arthur * [r10] svn2cl.xsl: fix copy-pasto 2005-07-31 14:40 arthur * [r9] svn2cl.xsl: make groupbyday either have yes or no value 2005-07-31 14:38 arthur * [r8] svn2cl.xsl: add a groupbyday option to group all changes per day per author 2005-03-25 17:11 arthur * [r7] svn2cl.xsl: make linelen really configurable (param instead of variable 2005-03-25 14:36 arthur * [r6] svn2cl.xsl: move printing of trailing newline to wrap template (plus some small readability improvements) 2005-03-25 14:29 arthur * [r5] svn2cl.xsl: make line length configurable 2005-03-23 21:51 arthur * [r4] svn2cl.xsl: split out formatting of single pathname and also handle situation with trailing slash in strip-prefix 2005-03-23 21:19 arthur * [r3] svn2cl.xsl: use entities for outputting tabs, spaces and newlines 2005-03-23 20:45 arthur * [r1] ., svn2cl.xsl: check in initial version svn2cl-0.14/svn2cl.xsl0000644000175000001440000003736312214677472011551 00000000000000 / / [r ] * , . , [DEL] [CPY] [ADD] svn2cl-0.14/svn2html.css0000644000175000001440000000230011263175230012044 00000000000000body { background-color: white; color: black; margin-left: 1.5em; margin-right: 1.5em; margin-top: 1.5em; margin-bottom: 1em; } ul.changelog_entries { margin-left: 0.7em; margin-right: 0.7em; padding-left: 0.7em; padding-right: 0.7em; padding-bottom: 0.7em; background: #fefefe; border: 1px dashed #88aa88; } li.changelog_entry { list-style-type: none; margin-left: 0px; padding-left: 0px; margin-top: 0.8em; border-top: 1px solid #dddddd; background: #f8f8f8; } li.changelog_change { list-style-type: circle; margin-left: 4em; } span.changelog_date { color: black; } span.changelog_author { color: #111188; } .changelog_revision { font-size: 80%; color: #881111; background: #fff4f4; } .changelog_revision a { color: inherit; } .changelog_files { font-size: 80%; font-family: monospace; color: #116611; } .changelog_files:after { content: ':'; } .changelog_message { display: block; color: #220000; } p.changelog_footer { margin-top: 1.5em; margin-left: 0.7em; font-style: italic; line-height: 90%; color: gray; font-family: Helvetica, Arial, sans-serif; } p.changelog_footer a { text-decoration: none; color: inherit; } svn2cl-0.14/svn2html.xsl0000644000175000001440000002656212214677472012116 00000000000000 <xsl:value-of select="string($title)" />

  • [r]

  • svn2cl-0.14/svn2cl.sh0000755000175000001440000002742212214677472011353 00000000000000#!/bin/sh # svn2cl.sh - front end shell script for svn2cl.xsl, calls xsltproc # with the correct parameters # # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 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. # exit on any failures set -e # report unset variables set -u # svn2cl version VERSION="0.14" # set default parameters PWD=`pwd` STRIPPREFIX="AUTOMATICALLY-DETERMINED" LINELEN=75 GROUPBYDAY="no" INCLUDEREV="no" BREAKBEFOREMSG="no" REPARAGRAPH="no" SEPARATEDAYLOGS="no" ACTIONS="no" CHANGELOG="" OUTSTYLE="cl" SVNLOGCMD="svn --verbose --xml log" SVNINFOCMD="svn --non-interactive info" AUTHORSFILE="" IGNORE_MESSAGE_STARTING="" TITLE="ChangeLog" REVISION_LINK="#r" TICKET_LINK="" TICKET_PREFIX="#" TMPFILES="" AWK="awk" # do command line checking prog=`basename "$0"` while [ $# -gt 0 ] do case "$1" in --strip-prefix) STRIPPREFIX="$2" shift 2 || { echo "$prog: option requires an argument -- $1";exit 1; } ;; --strip-prefix=*) STRIPPREFIX=`echo "$1" | sed 's/^--[a-z-]*=//'` shift ;; --linelen) LINELEN="$2"; shift 2 || { echo "$prog: option requires an argument -- $1";exit 1; } ;; --linelen=*) LINELEN=`echo "$1" | sed 's/^--[a-z-]*=//'` shift ;; --group-by-day) GROUPBYDAY="yes"; shift ;; --separate-daylogs) SEPARATEDAYLOGS="yes" shift ;; -i|--include-rev) INCLUDEREV="yes"; shift ;; -a|--include-actions) ACTIONS="yes" shift ;; --break-before-msg|--breaks-before-msg) # FIXME: if next argument is numeric use that as a parameter BREAKBEFOREMSG="yes" shift ;; --break-before-msg=*|--breaks-before-msg=*) BREAKBEFOREMSG=`echo "$1" | sed 's/^--[a-z-]*=//'` shift ;; --reparagraph) REPARAGRAPH="yes" shift ;; --title) TITLE="$2" shift 2 || { echo "$prog: option requires an argument -- $1";exit 1; } ;; --title=*) TITLE=`echo "$1" | sed 's/^--[a-z-]*=//'` shift ;; --revision-link) REVISION_LINK="$2" shift 2 || { echo "$prog: option requires an argument -- $1";exit 1; } ;; --revision-link=*) REVISION_LINK=`echo "$1" | sed 's/^--[a-z-]*=//'` shift ;; --ticket-link) TICKET_LINK="$2" shift 2 || { echo "$prog: option requires an argument -- $1";exit 1; } ;; --ticket-link=*) TICKET_LINK=`echo "$1" | sed 's/^--[a-z-]*=//'` shift ;; --ticket-prefix) TICKET_PREFIX="$2" shift 2 || { echo "$prog: option requires an argument -- $1";exit 1; } ;; --ticket-prefix=*) TICKET_PREFIX=`echo "$1" | sed 's/^--[a-z-]*=//'` shift ;; --ignore-message-starting) IGNORE_MESSAGE_STARTING="$2" shift 2 || { echo "$prog: option requires an argument -- $1";exit 1; } ;; --ignore-message-starting=*) IGNORE_MESSAGE_STARTING=`echo "$1" | sed 's/^--[a-z-]*=//'` shift ;; -f|--file|-o|--output) CHANGELOG="$2" shift 2 || { echo "$prog: option requires an argument -- $1";exit 1; } ;; --file=*|--output=*) CHANGELOG=`echo "$1" | sed 's/^--[a-z-]*=//'` shift ;; --stdout) CHANGELOG="-" shift ;; --authors) AUTHORSFILE="$2" shift 2 || { echo "$prog: option requires an argument -- $1";exit 1; } ;; --authors=*) AUTHORSFILE=`echo "$1" | sed 's/^--[a-z-]*=//'` shift ;; --html) OUTSTYLE="html" shift ;; -r|--revision|-c|--change|--targets|-l|--limit) # add these as extra options to the log command (with argument) arg=`echo "$2" | sed "s/'/'\"'\"'/g"` SVNLOGCMD="$SVNLOGCMD $1 '$arg'" shift 2 || { echo "$prog: option requires an argument -- $1";exit 1; } ;; --revision=*|--change=*|--targets=*|--limit=*) # these are single argument versions of the above (with argument) arg=`echo "$1" | sed "s/'/'\"'\"'/g"` SVNLOGCMD="$SVNLOGCMD '$arg'" shift ;; --username|--password|--config-dir|--config-option) # add these as extra options to the log and info commands (with argument) arg=`echo "$2" | sed "s/'/'\"'\"'/g"` SVNLOGCMD="$SVNLOGCMD $1 '$arg'" SVNINFOCMD="$SVNINFOCMD $1 '$arg'" shift 2 || { echo "$prog: option requires an argument -- $1";exit 1; } ;; --username=*|--password=*|--config-dir=*|--config-option=*) # these are single argument versions of the above (with argument) arg=`echo "$1" | sed "s/'/'\"'\"'/g"` SVNLOGCMD="$SVNLOGCMD '$arg'" SVNINFOCMD="$SVNINFOCMD '$arg'" shift ;; -g|--use-merge-history|--stop-on-copy) # add these as simple options to the log command SVNLOGCMD="$SVNLOGCMD $1" shift ;; --no-auth-cache|--non-interactive|--trust-server-cert) # add these as simple options to both the log and info commands SVNLOGCMD="$SVNLOGCMD $1" SVNINFOCMD="$SVNINFOCMD $1" shift ;; -V|--version) echo "$prog $VERSION"; echo "Written by Arthur de Jong." echo "" echo "Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Arthur de Jong." echo "This is free software; see the source for copying conditions. There is NO" echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit 0 ;; -h|--help) echo "Usage: $prog [OPTION]... [PATH]..." echo "Generate a ChangeLog from a subversion repository." echo "" echo " --strip-prefix=NAME prefix to strip from all entries, defaults path" echo " inside the repository" echo " --linelen=NUM maximum length of an output line" echo " --group-by-day group changelog entries by day" echo " --separate-daylogs put a blank line between grouped by day entries" echo " -i, --include-rev include revision numbers" echo " -a, --include-actions add [ADD], [DEL] and [CPY] tags to files" echo " --break-before-msg[=NUM] add a line break (or multiple breaks)" echo " between the paths and the log message" echo " --reparagraph rewrap lines inside a paragraph" echo " --title=NAME title used in html file" echo " --revision-link=NAME link revision numbers in html output" echo " --ticket-link=NAME change #foo strings to links" echo " --ignore-message-starting=STRING" echo " ignore messages starting with the string" echo " -o, --output=FILE output to FILE instead of ChangeLog" echo " -f, --file=FILE alias for -o, --output" echo " --stdout output to stdout instead of ChangeLog" echo " --authors=FILE file to read for authors" echo " --html output as html instead of plain text" echo " -h, --help display this help and exit" echo " -V, --version output version information and exit" echo "" echo "PATH arguments and the following options are passed to the svn log" echo "command: -r, --revision, -g, --use-merge-history, -c, --change," echo "--targets, --stop-on-copy, -l, --username, --password, --no-auth-cache," echo "--non-interactive, --trust-server-cert, --config-dir and --config-option" echo "(see 'svn help log' for more information)." exit 0 ;; -*) echo "$prog: invalid option -- $1" echo "Try '$prog --help' for more information." exit 1 ;; *) arg=`echo "$1" | sed "s/'/'\"'\"'/g"` SVNLOGCMD="$SVNLOGCMD '$arg'" SVNINFOCMD="$SVNINFOCMD '$arg'" shift ;; esac done # find the directory that this script resides in prog="$0" while [ -h "$prog" ] do dir=`dirname "$prog"` prog=`ls -ld "$prog" | sed "s/^.*-> \(.*\)/\1/;/^[^/]/s,^,$dir/,"` done dir=`dirname "$prog"` dir=`cd "$dir" && pwd` XSL="$dir/svn2${OUTSTYLE}.xsl" # check if the authors file is formatted as a legacy # colon separated file if [ -n "$AUTHORSFILE" ] && \ egrep '^(#.*|[a-zA-Z0-9].*:)' "$AUTHORSFILE" > /dev/null 2>/dev/null then # create a temporary file tmpfile=`mktemp -t svn2cl.XXXXXX 2> /dev/null || tempfile -s .svn2cl 2> /dev/null || echo "$AUTHORSFILE.$$.xml"` arg=`echo "$tmpfile" | sed "s/'/'\"'\"'/g"` TMPFILES="$TMPFILES '$arg'" # generate an authors.xml file on the fly echo '' > "$tmpfile" sed -n 's/&/\&/g;s//\>/g;s|^\([a-zA-Z0-9][^:]*\):\(.*\)$| \2|p' \ < "$AUTHORSFILE" >> "$tmpfile" echo '' >> "$tmpfile" AUTHORSFILE="$tmpfile" fi # find the absolute path of the authors file # (otherwise xsltproc will find the file relative to svn2cl.xsl) pwd=`pwd` AUTHORSFILE=`echo "$AUTHORSFILE" | sed "/^[^/]/s|^|$pwd/|"` # if no filename was specified, make one up if [ -z "$CHANGELOG" ] then CHANGELOG="ChangeLog" if [ "$OUTSTYLE" != "cl" ] then CHANGELOG="$CHANGELOG.$OUTSTYLE" fi fi # try to determin a prefix to strip from all paths if [ "$STRIPPREFIX" = "AUTOMATICALLY-DETERMINED" ] then STRIPPREFIX=`LANG=C eval "$SVNINFOCMD" | $AWK '/^URL:/{url=$2} /^Repository Root:/{root=$3} END{if(root){print substr(url,length(root)+2)}else{n=split(url,u,"/");print u[n]}}'` STRIPPREFIX=`echo "$STRIPPREFIX" | sed 's/%20/ /g'` fi # redirect stdout to the changelog file if needed if [ "x$CHANGELOG" != "x-" ] then exec > "$CHANGELOG" fi # actually run the command we need eval "$SVNLOGCMD" | \ xsltproc --stringparam strip-prefix "$STRIPPREFIX" \ --stringparam linelen "$LINELEN" \ --stringparam groupbyday "$GROUPBYDAY" \ --stringparam separate-daylogs "$SEPARATEDAYLOGS" \ --stringparam include-rev "$INCLUDEREV" \ --stringparam include-actions "$ACTIONS" \ --stringparam breakbeforemsg "$BREAKBEFOREMSG" \ --stringparam reparagraph "$REPARAGRAPH" \ --stringparam authorsfile "$AUTHORSFILE" \ --stringparam title "$TITLE" \ --stringparam revision-link "$REVISION_LINK" \ --stringparam ticket-link "$TICKET_LINK" \ --stringparam ticket-prefix "$TICKET_PREFIX" \ --stringparam ignore-message-starting "$IGNORE_MESSAGE_STARTING" \ --nowrite \ --nomkdir \ --nonet \ "$XSL" - # clean up temporary files [ -n "$TMPFILES" ] && eval "rm -f $TMPFILES" # we're done (the previous command could return false) exit 0