r22984 - gnucash-docs/trunk/util/svnlog2ul - Allow svnlog2ul.sh to run on the current working copy

Geert Janssens gjanssens at code.gnucash.org
Fri May 17 06:20:38 EDT 2013


Author: gjanssens
Date: 2013-05-17 06:20:38 -0400 (Fri, 17 May 2013)
New Revision: 22984
Trac: http://svn.gnucash.org/trac/changeset/22984

Modified:
   gnucash-docs/trunk/util/svnlog2ul/svnlog2ul.sh
Log:
Allow svnlog2ul.sh to run on the current working copy

And from the root directory instead of having to cd to util/svnlog2ul
Original author: John Ralls <jralls at ceridwen.us>

Modified: gnucash-docs/trunk/util/svnlog2ul/svnlog2ul.sh
===================================================================
--- gnucash-docs/trunk/util/svnlog2ul/svnlog2ul.sh	2013-05-17 10:10:50 UTC (rev 22983)
+++ gnucash-docs/trunk/util/svnlog2ul/svnlog2ul.sh	2013-05-17 10:20:38 UTC (rev 22984)
@@ -2,8 +2,9 @@
 #
 # svnlog2ul.sh <prevrelease> <newrelease>
 #
-# This script will extract all the svn commit messages
-# from the repository between two releases.
+# This script will extract all the svn commit messages from the
+# repository between two releases or from a previous release and the
+# current checkout's HEAD.
 # The result will be printed on standard out as a
 # html unordered list ("bulleted list").
 #
@@ -17,14 +18,25 @@
 # The search will return all commit messages between
 # <prevrelease> and <newrelease>
 #
-# Example:
-# 
+# Examples:
+# This will compile the changes between two tagged releases:
 #    svnlog2ul.sh 2.3.7 2.3.8
+# This will compile the changes between the tagged release and the
+# current HEAD in checked out working copy:
+#    svnlog2ul.sh 2.4.7
 
 oldrelease=$1
 newrelease=$2
 
-oldrev=$(svn info --xml http://svn.gnucash.org/repo/gnucash-docs/tags/$oldrelease | xsltproc getlastcommit.xslt -)
-newrev=$(svn info --xml http://svn.gnucash.org/repo/gnucash-docs/tags/$newrelease | xsltproc getlastcommit.xslt -)
+dir=`dirname "$0"`
 
-svn log -r$newrev:$oldrev --xml http://svn.gnucash.org/repo/gnucash-docs/tags/$newrelease | xsltproc log2ul.xslt -
+oldrev=$(svn info --xml http://svn.gnucash.org/repo/gnucash-docs/tags/$oldrelease | xsltproc "$dir/getlastcommit.xslt" -)
+if [ "x$2" == "x" ]
+then
+  newrev=$(svn info -r HEAD --xml | xsltproc "$dir/getlastcommit.xslt" -)
+  svn log -r$newrev:$oldrev --xml | xsltproc "$dir/log2ul.xslt" -
+else
+  newrev=$(svn info --xml http://svn.gnucash.org/repo/gnucash-docs/tags/$newrelease | xsltproc "$dir/getlastcommit.xslt" -)
+  svn log -r$newrev:$oldrev --xml http://svn.gnucash.org/repo/gnucash-docs/tags/$newrelease | xsltproc "$dir/log2ul.xslt" -
+fi
+



More information about the gnucash-changes mailing list