diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-03-06 14:42:25 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-03-06 14:42:25 +0200 |
commit | c8ec138afb7dfe52c96b7bd4e6321a5a03aca449 (patch) | |
tree | 3b4c76893caea72892774e133be24ca49fb41871 | |
parent | 0c1dcdf36ee4b7a5faf8b874f51e84b89e68303a (diff) | |
download | gamma-c8ec138afb7dfe52c96b7bd4e6321a5a03aca449.tar.gz gamma-c8ec138afb7dfe52c96b7bd4e6321a5a03aca449.tar.bz2 |
Finish migration to Git.
* .cvsignore, po/.cvsignore, src/.cvsignore: Rename to
.gitignore, with edits.
* examples/.cvsignore: Remove.
* m4/common.m4, m4/guile.m4, m4/lib.m4: Move to am (new dir).
* ChangeLog, ChangeLog.guile-sql: Merge into ChangeLog.cvs
* Makefile.am (AUTOMAKE_OPTIONS): Remove.
(ACLOCAL_AMFLAGS): Add -I am
(ChangeLog): New rule.
* configure.ac (build-aux): Use as aux-dir
(m4): Use as macro-dir.
* scripts/Makefile.am (EXTRA_DIST): Add gitlog-to-changelog
* scripts/gitlog-to-changelog: New file.
-rw-r--r-- | .gitignore (renamed from .cvsignore) | 17 | ||||
-rw-r--r-- | ChangeLog | 59 | ||||
-rw-r--r-- | ChangeLog.cvs (renamed from ChangeLog.guile-sql) | 59 | ||||
-rw-r--r-- | Makefile.am | 37 | ||||
-rw-r--r-- | am/common.m4 (renamed from m4/common.m4) | 0 | ||||
-rw-r--r-- | am/guile.m4 (renamed from m4/guile.m4) | 0 | ||||
-rw-r--r-- | am/lib.m4 (renamed from m4/lib.m4) | 0 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | examples/.cvsignore | 2 | ||||
-rw-r--r-- | m4/.cvsignore | 28 | ||||
-rw-r--r-- | po/.gitignore (renamed from po/.cvsignore) | 0 | ||||
-rw-r--r-- | scripts/.gitignore (renamed from scripts/.cvsignore) | 2 | ||||
-rw-r--r-- | scripts/Makefile.am | 3 | ||||
-rwxr-xr-x | scripts/gitlog-to-changelog | 191 | ||||
-rw-r--r-- | src/.gitignore (renamed from src/.cvsignore) | 3 |
15 files changed, 304 insertions, 102 deletions
@@ -1,11 +1,22 @@ +*.a +*.la +*.lo +*.o +*.tar.* +*~ +.deps +.emacs* +.gdbinit +.libs ABOUT-NLS INSTALL +ChangeLog Makefile Makefile.in -acinclude.m4 aclocal.m4 +autom4te.cache config.h.in -*.tar.gz autom4te.cache +build-aux config.log configure @@ -13,2 +24,4 @@ config.h config.status libtool +m4 +stamp-h1 diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index f5df2b6..0000000 --- a/ChangeLog +++ /dev/null @@ -1,59 +0,0 @@ -2008-06-20 Sergey Poznyakoff <gray@gnu.org.ua> - - * src/sql.sci (sql-catch-failure, sql-ignore-failure): New syntax. - * src/guile-sql.h (sql_iftab): Remove erroneous declaration. This - symbol is static in gsql_conn.c - -2008-05-27 Sergey Poznyakoff <gray@gnu.org.ua> - - * src/Makefile.am: Remove leftovers from gettext.scm. - -2007-12-26 Sergey Poznyakoff <gray@gnu.org.ua> - - * NEWS: Update. - * configure.ac: Version number 1.1 - * COPYING: GPLv3. - * Makefile.am: GPLv3. - * examples/whoisd.scm: GPLv3. - * m4/guile.m4: Require Guile v. 1.8 or later. - * scripts/Makefile.am: GPLv3. - * scripts/guile-doc-snarf.awk: GPLv3. - * src/.cvsignore (gettext.inc, gettext.scm): Remove. - * src/Makefile.am: Remove libguile-gettext. - * src/app.h: GPLv3. - * src/gsql_conn.c, src/gsql_lib.c, src/guile-sql.h, src/mysql.c, - src/pgsql.c: GPLv3; Guile v.>=1.8. - * src/gettext.sci, src/gettext.h, src/gettext.c: Remove. - * src/gettext.scm: New file. - -2006-10-12 Sergey Poznyakoff <gray@gnu.org.ua> - - * src/mysql.c (s_mysql_free): Bugfix: mysql was freed twice - (s_mysql_query): Fix the first argument to scm_list_2 - -2006-10-09 Sergey Poznyakoff <gray@gnu.org.ua> - - * src/gsql_conn.c (num_iface): Static - (sql_register_iface): Avoid registering the same interface twice. - -2005-06-26 Sergey Poznyakoff <gray@Noldor.runasimi.org> - - * src/app.h, src/gettext.c, src/gsql_conn.c, src/gsql_lib.c, - src/guile-sql.h, src/mysql.c, src/pgsql.c: Throw gsql-error, - instead of misc-error, on failure. - * COPYING, configure.ac, examples/whoisd.scm, m4/guile.m4, - scripts/guile-doc-snarf, scripts/guile-doc-snarf.awk, src/app.h, - src/gettext.c, src/gettext.h, src/gettext.sci, src/gsql_conn.c, - src/gsql_lib.c, src/guile-sql.h, src/mysql.c, src/pgsql.c, - src/sql.sci: Changed FSF postal mail address - - -2004-10-11 Sergey Poznyakoff <gray@Mirddin.farlep.net> - - Initial import - - -Local Variables: -mode: change-log -version-control: never -End: diff --git a/ChangeLog.guile-sql b/ChangeLog.cvs index 965ca14..428ee5d 100644 --- a/ChangeLog.guile-sql +++ b/ChangeLog.cvs @@ -1,2 +1,61 @@ +2008-06-20 Sergey Poznyakoff <gray@gnu.org.ua> + + * src/sql.sci (sql-catch-failure, sql-ignore-failure): New syntax. + * src/guile-sql.h (sql_iftab): Remove erroneous declaration. This + symbol is static in gsql_conn.c + +2008-05-27 Sergey Poznyakoff <gray@gnu.org.ua> + + * src/Makefile.am: Remove leftovers from gettext.scm. + +2007-12-26 Sergey Poznyakoff <gray@gnu.org.ua> + + * NEWS: Update. + * configure.ac: Version number 1.1 + * COPYING: GPLv3. + * Makefile.am: GPLv3. + * examples/whoisd.scm: GPLv3. + * m4/guile.m4: Require Guile v. 1.8 or later. + * scripts/Makefile.am: GPLv3. + * scripts/guile-doc-snarf.awk: GPLv3. + * src/.cvsignore (gettext.inc, gettext.scm): Remove. + * src/Makefile.am: Remove libguile-gettext. + * src/app.h: GPLv3. + * src/gsql_conn.c, src/gsql_lib.c, src/guile-sql.h, src/mysql.c, + src/pgsql.c: GPLv3; Guile v.>=1.8. + * src/gettext.sci, src/gettext.h, src/gettext.c: Remove. + * src/gettext.scm: New file. + +2006-10-12 Sergey Poznyakoff <gray@gnu.org.ua> + + * src/mysql.c (s_mysql_free): Bugfix: mysql was freed twice + (s_mysql_query): Fix the first argument to scm_list_2 + +2006-10-09 Sergey Poznyakoff <gray@gnu.org.ua> + + * src/gsql_conn.c (num_iface): Static + (sql_register_iface): Avoid registering the same interface twice. + +2005-06-26 Sergey Poznyakoff <gray@Noldor.runasimi.org> + + * src/app.h, src/gettext.c, src/gsql_conn.c, src/gsql_lib.c, + src/guile-sql.h, src/mysql.c, src/pgsql.c: Throw gsql-error, + instead of misc-error, on failure. + * COPYING, configure.ac, examples/whoisd.scm, m4/guile.m4, + scripts/guile-doc-snarf, scripts/guile-doc-snarf.awk, src/app.h, + src/gettext.c, src/gettext.h, src/gettext.sci, src/gsql_conn.c, + src/gsql_lib.c, src/guile-sql.h, src/mysql.c, src/pgsql.c, + src/sql.sci: Changed FSF postal mail address + + +2004-10-11 Sergey Poznyakoff <gray@Mirddin.farlep.net> + + Initial import + + +Local Variables: +mode: change-log +version-control: never +End: 2004-10-09 Sergey Poznyakoff <gray@Mirddin.farlep.net> diff --git a/Makefile.am b/Makefile.am index 482c447..77df972 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ # This file is part of guile-sql. -# Copyright (C) 2002, 2007, Sergey Poznyakoff +# Copyright (C) 2002, 2007, 2010 Sergey Poznyakoff # # This file is free software; as a special exception the author gives @@ -10,6 +10,37 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -AUTOMAKE_OPTIONS = gnu 1.8 -ACLOCAL_AMFLAGS = -I m4 +ACLOCAL_AMFLAGS = -I m4 -I am SUBDIRS = src scripts examples po + +# Define the following variables in order to use the ChangeLog rule below: +# prev_change_log [optional] Name of the previous ChangeLog file. +# gen_start_date [optional] Start ChangeLog from this date. +# changelog_dir [mandatory] Directory where to create ChangeLog +gen_start_date = 2008-06-21 +prev_change_log = ChangeLog.cvs +changelog_dir = . + +.PHONY: ChangeLog +ChangeLog: + if test -d .git; then \ + cmd=$(top_srcdir)/scripts/gitlog-to-changelog; \ + if test -n "$(gen_start_date)"; then \ + cmd="$$cmd --since=\"$(gen_start_date)\""; \ + fi; \ + $$cmd --format='%s%n%n%b%n' | \ + sed '/<unknown>$$/d' | fmt -s > $(changelog_dir)/cl-t; \ + if test -n "$(prev_change_log)" && test -f "$(prev_change_log)"; \ + then \ + echo "" >> $(changelog_dir)/cl-t; \ + cat "$(prev_change_log)" | \ + sed '/^Local Variables:/,/^End:/d' >> $(changelog_dir)/cl-t; \ + fi; \ + echo "Local Variables:" >> $(changelog_dir)/cl-t; \ + echo "mode: change-log" >> $(changelog_dir)/cl-t; \ + echo "version-control: never" >> $(changelog_dir)/cl-t; \ + echo "buffer-read-only: t" >> $(changelog_dir)/cl-t; \ + echo "End:" >> $(changelog_dir)/cl-t; \ + rm -f $(changelog_dir)/ChangeLog; \ + mv $(changelog_dir)/cl-t $(changelog_dir)/ChangeLog; \ + fi diff --git a/m4/common.m4 b/am/common.m4 index f78364a..f78364a 100644 --- a/m4/common.m4 +++ b/am/common.m4 diff --git a/m4/guile.m4 b/am/guile.m4 index 33fcbff..33fcbff 100644 --- a/m4/guile.m4 +++ b/am/guile.m4 diff --git a/configure.ac b/configure.ac index 1262460..7f1ee3b 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,8 @@ AC_PREREQ(2.59) AC_INIT(gamma, 1.1, [gray@gnu.org.ua]) AC_CONFIG_SRCDIR(src/guile-sql.h) -AC_CONFIG_AUX_DIR([scripts]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([gnu 1.8]) AC_CONFIG_HEADERS([config.h]) diff --git a/examples/.cvsignore b/examples/.cvsignore deleted file mode 100644 index c038ed7..0000000 --- a/examples/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in
\ No newline at end of file diff --git a/m4/.cvsignore b/m4/.cvsignore deleted file mode 100644 index 6d74ce1..0000000 --- a/m4/.cvsignore +++ /dev/null @@ -1,28 +0,0 @@ -codeset.m4 -gettext.m4 -glibc21.m4 -iconv.m4 -intdiv0.m4 -intmax.m4 -inttypes-pri.m4 -inttypes.m4 -inttypes_h.m4 -isc-posix.m4 -lcmessage.m4 -lib-ld.m4 -lib-link.m4 -lib-prefix.m4 -longdouble.m4 -longlong.m4 -nls.m4 -po.m4 -printf-posix.m4 -progtest.m4 -signed.m4 -size_max.m4 -stdint_h.m4 -uintmax_t.m4 -ulonglong.m4 -wchar_t.m4 -wint_t.m4 -xsize.m4 diff --git a/po/.cvsignore b/po/.gitignore index 1ce9065..1ce9065 100644 --- a/po/.cvsignore +++ b/po/.gitignore diff --git a/scripts/.cvsignore b/scripts/.gitignore index dfa300e..ef6f584 100644 --- a/scripts/.cvsignore +++ b/scripts/.gitignore @@ -1,4 +1,2 @@ -Makefile.in -Makefile config.rpath mkinstalldirs diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 88811c1..850d661 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -12,3 +12,4 @@ EXTRA_DIST = \ guile-doc-snarf\ - guile-doc-snarf.awk + guile-doc-snarf.awk\ + gitlog-to-changelog diff --git a/scripts/gitlog-to-changelog b/scripts/gitlog-to-changelog new file mode 100755 index 0000000..7660af5 --- /dev/null +++ b/scripts/gitlog-to-changelog @@ -0,0 +1,191 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Convert git log output to ChangeLog format. + +my $VERSION = '2009-10-30 13:46'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2008-2010 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try `$ME --help' for more information.\n"; + } + else + { + print $STREAM <<EOF; +Usage: $ME [OPTIONS] [ARGS] + +Convert git log output to ChangeLog format. If present, any ARGS +are passed to "git log". To avoid ARGS being parsed as options to +$ME, they may be preceded by '--'. + +OPTIONS: + + --since=DATE convert only the logs since DATE; + the default is to convert all log entries. + --format=FMT set format string for commit subject and body; + see 'man git-log' for the list of format metacharacters; + the default is '%s%n%b%n' + + --help display this help and exit + --version output version information and exit + +EXAMPLE: + + $ME --since=2008-01-01 > ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new string. +sub shell_quote($) +{ + my ($s) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +{ + my $since_date = '1970-01-01 UTC'; + my $format_string = '%s%n%b%n'; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + ) or usage 1; + + my @cmd = (qw (git log --log-size), "--since=$since_date", + '--pretty=format:%ct %an <%ae>%n%n'.$format_string, @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); + + my $prev_date_line = ''; + while (1) + { + defined (my $in = <PIPE>) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + my @line = split "\n", $log; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1)); + # If this line would be the same as the previous date/name/email + # line, then arrange not to print it. + if ($date_line ne $prev_date_line) + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + } + $prev_date_line = $date_line; + + # Omit "Signed-off-by..." lines. + @line = grep !/^Signed-off-by: .*>$/, @line; + + # If there were any lines + if (@line == 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"; + } + else + { + # Remove leading and trailing blank lines. + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = <PIPE>) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/src/.cvsignore b/src/.gitignore index 822742d..b2219c8 100644 --- a/src/.cvsignore +++ b/src/.gitignore @@ -1,5 +1,2 @@ -Makefile.in -Makefile -.deps *.x *.doc |