r22983 - gnucash/trunk/util - Add script to generate a list of changes in html format between two revisions based on git log

Geert Janssens gjanssens at code.gnucash.org
Fri May 17 06:10:50 EDT 2013


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

Added:
   gnucash/trunk/util/gitlog2ul.sh
Log:
Add script to generate a list of changes in html format between two revisions based on git log

This is the equivalent of svnlog2ul.sh which does the same from svn log

Added: gnucash/trunk/util/gitlog2ul.sh
===================================================================
--- gnucash/trunk/util/gitlog2ul.sh	                        (rev 0)
+++ gnucash/trunk/util/gitlog2ul.sh	2013-05-17 10:10:50 UTC (rev 22983)
@@ -0,0 +1,55 @@
+#! /bin/bash
+#
+# gitlog2ul.sh <prevrelease> <newrelease>
+#
+# This script will extract all the commit messages from the git
+# 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").
+#
+# Parameters:
+#
+#    <prevrelease> : the git tag for the release to start
+#                    the commit message search
+#    <newrelease>  : the git tag for the release to end
+#                    the commit message search
+#
+# The search will return all commit messages between
+# <prevrelease> and <newrelease>
+#
+# Examples:
+# This will compile the changes between two tagged releases:
+#    gitlog2ul.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:
+#    gitlog2ul.sh 2.4.7
+
+oldrelease=$1
+newrelease=$2
+
+dir=`dirname "$0"`
+
+# Print basic headers (to match what svn2log generates)
+cat <<EOF
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+  <body>
+    <ul>
+EOF
+
+if [ "x$2" == "x" ]
+then
+  newrelease=HEAD
+fi
+
+git --no-pager log --format="<li>%s%n<br/>%b</li>" $oldrelease..$newrelease | egrep -v "git-svn-id|^(<br/>)?BP$|^$"
+
+cat <<EOF
+  </ul>
+</body>
+EOF


Property changes on: gnucash/trunk/util/gitlog2ul.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the gnucash-changes mailing list