[libgda] Use a script to generate a ChangeLog similar to the one before switching to git



commit 7d83cc3d92137218ee23290b0e44e366dc09ef3e
Author: Vivien Malerba <malerba gnome-db org>
Date:   Tue Aug 25 19:13:56 2009 +0200

    Use a script to generate a ChangeLog similar to the one before switching to git
    
    thanks to Bas Driessen. The current ChangeLog has been replaced by a notice.

 ChangeLog           |  351 +--------------------------------------------------
 Makefile.am         |    2 +-
 gitlog2changelog.py |  124 ++++++++++++++++++
 3 files changed, 127 insertions(+), 350 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 25bafc6..9fc0f8d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,349 +1,2 @@
-2009-06-30  Vivien Malerba <malerba gnome-db org>
-
-	* doc/C/libgda-4.0-sections.txt:
-	* libgda-4.0.pc.in:
-	* libgda/providers-support/Makefile.am:
-	* libgda/sql-parser/Makefile.am:
-	* libgda/sqlite/virtual/Makefile.am:
-	* providers/sqlite/Makefile.am: correction for bug #587435
-
-2009-06-30  Murray Cumming  <murrayc murrayc com>
-
-	* libgda/sql-parser/gda-statement-struct-*.h: Add G_BEGIN_DECLS and 
-	G_END_DECLS so these can be used from C++.
-
-2009-05-17  Vivien Malerba <malerba gnome-db org>
-
-	* configure.in:
-	* testing/:
-	* libgdaui/: moved some contents from Libgnomedb
-	* control-center/: moved Libgnomedb's control center
-	* tools/browser/: new browser tool
-	* po/: added new files
-
-2009-06-08  Vivien Malerba <malerba gnome-db org>
-
-	* libgda-report/RML/trml2html/Makefile.am:
-	* libgda-report/RML/trml2pdf/Makefile.am: applied patch
-	for bug #579458 (Gilles Dartiguelongue) for more standard install
-	methods
-	* configure.in: don't check for GnomeVFS if Gio has been found,
-	fixed bug #585108
-
-2009-06-05  Vivien Malerba <malerba gnome-db org>
-
-	* tools/gda-sql.c: overwrite any existing definition of a saved statement with
-	the same name when saving a new statement
-
-2009-06-04  Vivien Malerba <malerba gnome-db org>
-
-	* libgda/sqlite/gda-sqlite-provider.c:
-	  - when adding ROWID columns in a SELECT statement, make sure to also
-	    modify ORDER BY clauses if necessary
-	  - don't add ROWID clauses if there is a DISTINCT clause
-	  - fixed rendering of SELECT statements when a COMPOUND statement is used
-	    as the FROM part of another statement
-
-2009-06-04  Vivien Malerba <malerba gnome-db org>
-
-	Merged changes from LIBGDA_4.0 branch
-
-2009-05-13  Vivien Malerba <malerba gnome-db org>
-
-	* providers/oracle/gda-oracle-provider.c: make the Oracle provider
-	instanciate the correct SQL parser
-
-2009-05-13  Vivien Malerba <malerba gnome-db org>
-
-	* samples/SqlParserConsole/console.c: fix bug in options parsing and help
-
-2009-05-08  Vivien Malerba <malerba gnome-db org>
-
-	* po/POTFILES.in: added missing file
-	* providers/oracle/gda-oracle-meta.c: misc. improvements
-
-2009-05-06  Vivien Malerba <malerba gnome-db org>
-
-	* tools/Makefile.am: install web server data files in the same dir as
-	Libgda 4.0, for bug #580821
-
-2009-05-06  Vivien Malerba <malerba gnome-db org>
-
-	* providers/oracle:
-	  - use the callback API to fetch results for variable length data types
-	  - implemented more meta data retreival
-	  - booleans (which is not an Oracle data type) are interpreted as 0 an !0
-	  - better handling of OCI types
-	* libgda/gda-data-meta-wrapper.c: bug fixes
-	* libgda/gda-meta-store.c: bug fixes
-	* providers/postgres/gda-postgres-meta.c: bug fixes
-
-2009-05-05  Vivien Malerba <malerba gnome-db org>
-
-	* libgda/gda-sql-builder.c:
-	* libgda/gda-tree-manager.c:
-	* libgda/gda-tree-node.c:
-	* libgda/gda-tree.c:
-	* libgda/thread-wrapper/gda-thread-wrapper.c: applied patch to fix bug #581408
-	(thanks to Halton Huo)
-
-2009-05-01  Vivien Malerba <malerba gnome-db org>
-
-	* libgda/Makefile.am:
-	* libgda/gda-data-meta-wrapper.[ch]: new (private) GdaDataModel wrapper internally
-	used by the GdaMetaStore object
-	* libgda/gda-data-access-wrapper.h: removed unnecessary #include
-	* libgda/gda-enums.h: added the GdaSqlIdentifierStyle enum
-	* libgda/gda-meta-store.[ch]:
-	  - use the new GdaDataMetaWrapper object to "filter" the
-	    updates made by each database provider when updating the meta data
-	  - added gda_meta_store_set_identifiers_style(), to be used by database providers
-	* libgda/gda-meta-struct.c: updates the way information is searced in the GdaMetaStore
-	* libgda/information_schema.xml: identify which columns are SQL identifiers
-	* libgda/gda-util.c: improved the gda_completion_list_get() function
-	* tools/tools-input.c: correctly set break characters for completion
-	* libgda/sql-parser/gda-statement-struct-util.c: corrected gda_sql_identifier_needs_quotes()
-	* doc/C: SQL identifiers precisions
-
-2009-04-28  Vivien Malerba <malerba gnome-db org>
-
-	* libgda.doap: prefixed mail with "mailto:";
-	* tools/gda-sql.c:
-	  - allow to specify which kind of meta data to update in the "meta" command
-	  - store the dictionary in a file even for connections not created from a DSN
-	    if GLIB >= 2.16.0, no change otherwise
-
-2009-04-23  Vivien Malerba <malerba gnome-db org>
-
-	* libgda/gda-config.c: only display a warning if loading a provider fails if the
-	GDA_SHOW_PROVIDER_LOADING_ERROR environment variable is set
-	* providers/mysql/gda-mysql-provider.c: enable the GDA_SERVER_OPERATION_CREATE_DB,
-	GDA_SERVER_OPERATION_DROP_DB, GDA_SERVER_OPERATION_DROP_TABLE, GDA_SERVER_OPERATION_RENAME_TABLE,
-	GDA_SERVER_OPERATION_ADD_COLUMN, GDA_SERVER_OPERATION_DROP_COLUMN,
-	GDA_SERVER_OPERATION_CREATE_INDEX, GDA_SERVER_OPERATION_DROP_INDEX,
-	GDA_SERVER_OPERATION_CREATE_VIEW and GDA_SERVER_OPERATION_DROP_VIEW operations
-	* doc/C: doc. update
-
-2009-04-23  Vivien Malerba <malerba gnome-db org>
-
-	* configure.in:
-	* providers/oracle: improved Oracle provider
-
-2009-04-22  Vivien Malerba <malerba gnome-db org>
-
-	* libgda/gda-statement.h: added the GDA_STATEMENT_SQL_PARAMS_AS_VALUES constant
-	name which defaults to 0
-	* libgda/gda-statement.c: fix for bug #579513
-
-2009-04-21  Vivien Malerba <malerba gnome-db org>
-
-	* doc/C/libgda-4.0-docs.sgml:
-	* doc/C/prov-writing.xml: detailled how to create a new provider from template
-
-2009-04-20  Vivien Malerba <malerba gnome-db org>
-
-	* configure.in:
-	* providers/Makefile.am:
-	* providers/oracle/*: set up new oracle provider structure
-
-2009-04-19  Vivien Malerba <malerba gnome-db org>
-
-	* libgda-report/RML/trml2html/Makefile.am:
-	* libgda-report/RML/trml2pdf/Makefile.am: applied patch
-	for bug #579458 (Gilles Dartiguelongue)
-
-2009-04-18  Vivien Malerba <malerba gnome-db org>
-
-	* configure.in: set version to 4.1.1
-
-Released 4.1.0
-
-2009-04-18  Vivien Malerba <malerba gnome-db org>
-
-	* libgda/sqlite/sqlite-src: uses SQLite version 3.6.13
-
-2009-04-18  Vivien Malerba <malerba gnome-db org>
-
-	* providers/postgres/gda-postgres-provider.c: display a warning when
-	the PostgreSQL provider does not identify any data type
-
-2009-04-17  Vivien Malerba <malerba gnome-db org>
-
-	* libgda/sqlite/gda-sqlite.h:
-	* libgda/sqlite/gda-sqlite-meta.c:
-	* libgda/sqlite/gda-sqlite-provider.c: make the SQLite
-	provider compile with a system installed SQLite
-
-2009-04-17  Vivien Malerba <malerba gnome-db org>
-
-	* providers/postgres/gda-postgres-provider.c: fix for bug #578748
-	* libgda/thread-wrapper/gda-thread-wrapper.c: don't attempt to create a GdaThreadWrapper
-	object if g_thread_supported() is FALSE
-	* libgda/thread-wrapper/Makefile.am:
-	* libgda/thread-wrapper/gda-thread-meta.[ch]: meta data retreival implementation
-	* libgda/thread-wrapper/gda-thread-provider.[ch]:
-	  - reuse the same GdaThreadWrapper object for providers which can only be
-	    accessed from a single thread
-	  - correctly behave when g_thread_supported() is FALSE
-	  - use new implementation of meta data retreival
-	* libgda/gda-server-provider.c: doc. correction
-	* libgda/gda-connection.c:
-	  - removed debug message
-	  - corrected locking in gda_connection_update_meta_store()
-	  - return an error if the GDA_CONNECTION_OPTIONS_THREAD_SAFE flag is specified
-	    but g_thread_supported() is FALSE
-	  - gda_connection_update_meta_store()'s implementation is now generic (no specific
-	    implementation for connections which use a thread wrapper)
-	* tools/gda-sql.c:
-	  - use the GDA_CONNECTION_OPTIONS_THREAD_SAFE flag when opening connections
-	  - meta data retreival is now done in the background (statements can be executed
-	    while it is being done)
-	* libgda/Makefile.am:
-	* libgda/libgda.symbols:
-	* libgda/gda-repetitive-statement.[ch]: new object to prepare the execution of
-	a statement with several differents variables' values sets
-	* libgda/gda-connection.c: added gda_connection_repetitive_statement_execute()
-	* doc/C: doc.update
-	* configure.in: a system installed SQLite is now only searched for if the
-	--enable-system-sqlite option is passed, and the presence of the sqlite3CreateFunc
-	symbol is not anymore required. The only drawback of using a system installed
-	SQLite is that meta data regarding functions will not be available
-	* Makefile.am:
-	* samples/MetaStore/background.c:
-	* samples/MetaStore/README: new example showing how to update the meta data
-	in the background (in a sub thread) using the GdaThreadWrapper object
-	* libgda/handlers/gda-handler-time.c: fix mem leak
-	* samples/SqlBuilder/example.c:
-	* libgda/gda-sql-builder.[ch]: improved API and features of the GdaSqlBuilder
-	object
-	* libgda.doap: project description
-
-2009-04-14  Vivien Malerba <malerba gnome-db org>
-
-	* libgda/thread-wrapper/Makefile.am:
-	* libgda/thread-wrapper/gda-thread-blob-op.[ch]: wrapper for GdaBlobOp
-	objects
-	* libgda/thread-wrapper/gda-thread-wrapper.[ch]:
-	  - loosened locking
-	  - allow the wrapped thread to use the GdaThreadWrapper object
-	  - API change in gda_thread_wrapper_fetch_result()
-	* libgda/thread-wrapper/gda-thread-recordset.c:
-	  - use the new GdaThreadBlobOp object
-	  - adaptations to the API change in gda_thread_wrapper_fetch_result()
-	* libgda/thread-wrapper/gda-thread-provider.[ch]:
-	  - renamed gda_thread_provider_get_type() to _gda_thread_provider_get_type()
-	    to avoid exporting the symbol
-	  - implemented asynchronous execution
-	  - adaptations to the API change in gda_thread_wrapper_fetch_result()
-	* tests/multi-threading/check_wrapper.c:
-	  - adaptations to the API change in gda_thread_wrapper_fetch_result()
-	* libgda/gda-connection.c:
-	  - instanciate the database provider only when really needed
-	  - loosened locking
-	* tools/test_blob.sh: adapted to version 4.1
-	* doc/C: doc. updates regarding multi-threading and asynchronous statement
-	execution
-	* Makefile.am:
-	* samples/Makefile:
-	* samples/README:
-	* samples/AsyncExec: new example about hos to use the asynchronous statement
-	execution API
-
-2009-04-07  Vivien Malerba <malerba gnome-db org>
-
-	* configure.in:
-	* libgda/Makefile.am:
-	* libgda/thread-wrapper/Makefile.am: new directory
-	* libgda/thread-wrapper/gda-thread-wrapper.[ch]: new object which
-	allows one to execute functions in a private sub thread from any
-	other thread.
-	* libgda/thread-wrapper/gda-thread-provider.[ch]:
-	* libgda/thread-wrapper/gda-thread-recordset.[ch]: new built-in
-	pseudo provider to constrain a GdaConnection's usage within a private
-	sub thread, making its usage completely thread safe
-	* libgda/gda-connection-sqlite.h: file renamed to
-	libgda/gda-connection-internal.h
-	* libgda/gda-connection.[ch]:
-	  - added a GDA_CONNECTION_OPTIONS_THREAD_SAFE flag to use when opening
-	    a connection
-	  - added asynchronous statement execution methods:
-	    gda_connection_async_statement_execute(), gda_connection_async_fetch_result()
-	    and gda_connection_async_cancel()
-	  - the GdaConnection can now be created by the new GdaThreadProvider pseudo
-	    provider to wrap a real GdaConnection object in a private sub thread
-	* libgda/providers-support/gda-data-select-priv.h:
-	* libgda/gda-data-select.c: adaptations to be used by the new GdaThreadRecordset
-	* libgda/gda-meta-store.c:
-	  - now thread safe
-	  - corrections to gda_meta_store_schema_get_structure()
-	* libgda/gda-server-provider.[ch]: new virtual method to handle async. requests
-	* libgda/sqlite/gda-sqlite-recordset.c: minor correction
-	* po/POTFILES.in: added new files
-	* providers/postgres/gda-postgres-util.c:
-	* providers/postgres/gda-postgres.h: make sure a PostgreSQL connection is only
-	used by one statement at a time
-	* doc/C: doc. updates
-	* tests/multi-threading/dummy-object.[ch]:
-	* tests/multi-threading/check_wrapper.c: new test for the GdaThreadWrapper object
-	* tests/multi-threading/check_threaded_cnc: new test for connections opened with
-	the GDA_CONNECTION_OPTIONS_THREAD_SAFE flag
-	* tools/web-server.c: don't check for uint8_t
-
-2009-03-27  Vivien Malerba <malerba gnome-db org>
-
-	Merged changes from LIBGDA_4.0 branch between revisions 3362 and 3370
-
-2009-03-25  Vivien Malerba <malerba gnome-db org>
-
-	* libgda/gda-tree-mgr-select.c: fix error message, for bug #576730
-
-2009-03-23  Vivien Malerba <malerba gnome-db org>
-
-	* po/POTFILES.in: added libgda/gda-sql-builder.c
-	* configure.in: don't override MYSQL_CFLAGS if it has already been set as
-	an environment variable
-
-2009-03-19  Vivien Malerba <malerba gnome-db org>
-
-	* libgda/Makefile.am:
-	* libgda/libgda.h.in:
-	* libgda/gda-sql-builder.[ch]: new object to build GdaStatement iterativaly
-	* Makefile.am:
-	* samples/: new example illustrating how to use the new #GdaSqlBuilder object
-	* doc/C:
-	  - document GdaSqlBuilder
-	  - have 'make distcheck' work again
-
-2009-03-17  Vivien Malerba <malerba gnome-db org>
-
-	* tools/Makefile.am: set binaries extension to 4.1
-	* Changelog: splitted changes before 4.0 to ChangeLog-pre-4.0
-	* libgda/Makefile.am:
-	* libgda/libgda.symbols:
-	* libgda/libgda.h.in:
-	* libgda/gda-decl.h:
-	* libgda/gda-tree.[ch]:
-	* libgda/gda-tree-node.[ch]:
-	* libgda/gda-tree-manager.[ch]:
-	* libgda/gda-tree-mgr-label.[ch]:
-	* libgda/gda-tree-mgr-schemas.[ch]:
-	* libgda/gda-tree-mgr-tables.[ch]:
-	* libgda/gda-tree-mgr-columns.[ch]:
-	* libgda/gda-tree-mgr-select.[ch]: new GdaTree and related implementation
-	* Makefile.am:
-	* samples/: added a Tree example to show how to use GdaTree
-	* po/POTFILES.in: added new files
-	* libgda/gda-set.h: doc. update
-	* doc/C:
-	  - doc. updates for GdaTree and related
-	  - added a deprecated symbols section
-	  - added new symbols for 4.2 section
-	  - added version number
-
-2009-03-16  Vivien Malerba <malerba gnome-db org>
-
-	* configure.in:
-	  - set version to 4.1.0
-	  - increased library version
-
-Released 4.0.0
+The ChangeLog is auto-generated when releasing. If you
+are seeing this, use 'git log' for a detailed list of changes.
diff --git a/Makefile.am b/Makefile.am
index c1fbb5d..c0c5888 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -107,7 +107,7 @@ dist-hook:
 		echo Creating ChangeLog && \
 		( cd "$(top_srcdir)" && \
 		  echo '# Generated by Makefile. Do not edit.'; echo; \
-		  $(top_srcdir)/missing --run git log -w eb0a68166a0b08c369a1acd8ebbde6e939d30d67.. --pretty=format:"%cd  %an <%ae>%n%n%s%n%n%b%n" --date=short ) > ChangeLog.tmp \
+		  $(top_srcdir)/missing --run $(top_srcdir)/gitlog2changelog.py ) > ChangeLog.tmp \
 		&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
 		|| ( rm -f ChangeLog.tmp ; \
 		     echo Failed to generate ChangeLog >&2 ); \
diff --git a/gitlog2changelog.py b/gitlog2changelog.py
new file mode 100755
index 0000000..85453f8
--- /dev/null
+++ b/gitlog2changelog.py
@@ -0,0 +1,124 @@
+#!/usr/bin/python
+# Copyright 2008 Marcus D. Hanwell <marcus cryos org>
+# Distributed under the terms of the GNU General Public License v2 or later
+ 
+import sys, string, re, os
+ 
+# Execute git log with the desired command line options.
+fin = os.popen('git log --summary --stat --no-merges --date=short eb0a68166a0b08c369a1acd8ebbde6e939d30d67..', 'r')
+# Create a ChangeLog file in the current directory.
+fout = sys.stdout
+ 
+# Set up the loop variables in order to locate the blocks we want
+authorFound = False
+dateFound = False
+messageFound = False
+filesFound = False
+message = ""
+messageNL = False
+files = ""
+prevAuthorLine = ""
+ 
+# The main part of the loop
+for line in fin:
+    # The commit line marks the start of a new commit object.
+    if string.find(line, 'commit') >= 0:
+        # Start all over again...
+        authorFound = False
+        dateFound = False
+        messageFound = False
+        messageNL = False
+        message = ""
+        filesFound = False
+        files = ""
+        continue
+    # Match the author line and extract the part we want
+    elif re.match('Author:', line) >=0:
+        authorList = re.split(': ', line, 1)
+        author = authorList[1]
+        author = author[0:len(author)-1]
+        authorFound = True
+    # Match the date line
+    elif re.match('Date:', line) >= 0:
+        dateList = re.split(': ', line, 1)
+        date = dateList[1]
+        date = date[2:len(date)-1]
+        dateFound = True
+    # The svn-id lines are ignored
+    elif re.match(' git-svn-id:', line) >= 0:
+        continue
+    # The sign off line is ignored too
+    elif re.search('Signed-off-by', line) >= 0:
+        continue
+    # Extract the actual commit message for this commit
+    elif authorFound & dateFound & messageFound == False:
+        # Find the commit message if we can
+        if len(line) == 1:
+            if messageNL:
+                messageFound = True
+            else:
+                messageNL = True
+        elif len(line) == 4:
+            messageFound = True
+        else:
+            if len(message) == 0:
+                message = message + line.strip()
+            else:
+                message = message + " " + line.strip()
+    # If this line is hit all of the files have been stored for this commit
+    elif re.search('files changed', line) >= 0:
+        filesFound = True
+        continue
+    # Collect the files for this commit. FIXME: Still need to add +/- to files
+    elif authorFound & dateFound & messageFound:
+        fileList = re.split(' \| ', line, 2)
+        if len(fileList) > 1:
+            if len(files) > 0:
+                files = files + ", " + fileList[0].strip()
+            else:
+                files = fileList[0].strip()
+    # All of the parts of the commit have been found - write out the entry
+    if authorFound & dateFound & messageFound & filesFound:
+        # First the author line, only outputted if it is the first for that
+        # author on this day
+        authorLine = date + "  " + author
+        if len(prevAuthorLine) == 0:
+            fout.write(authorLine + "\n")
+        elif authorLine == prevAuthorLine:
+            pass
+        else:
+            fout.write("\n" + authorLine + "\n")
+ 
+        # Assemble the actual commit message line(s) and limit the line length
+        # to 80 characters.
+        commitLine = "* " + files + ": " + message
+        i = 0
+        commit = ""
+        while i < len(commitLine):
+            if len(commitLine) < i + 72:
+                commit = commit + "\n	" + commitLine[i:len(commitLine)]
+                break
+            index = commitLine.rfind(' ', i, i+72)
+            if index > i:
+                commit = commit + "\n	" + commitLine[i:index]
+                i = index+1
+            else:
+                commit = commit + "\n	" + commitLine[i:72]
+                i = i+73
+ 
+        # Write out the commit line
+        fout.write(commit + "\n")
+ 
+        #Now reset all the variables ready for a new commit block.
+        authorFound = False
+        dateFound = False
+        messageFound = False
+        messageNL = False
+        message = ""
+        filesFound = False
+        files = ""
+        prevAuthorLine = authorLine
+ 
+# Close the input and output lines now that we are finished.
+fin.close()
+fout.close()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]