You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by mx...@apache.org on 2012/09/23 01:05:56 UTC

svn commit: r1388920 - in /tcl/rivet/branches/2.0: ChangeLog Makefile.in VERSION configure.ac doc/README doc/rivet-full.xml rivet/packages/dio/dio.tcl rivet/packages/dio/dio_Sqlite.tcl rivet/pkgIndex.tcl

Author: mxmanghi
Date: Sat Sep 22 23:05:55 2012
New Revision: 1388920

URL: http://svn.apache.org/viewvc?rev=1388920&view=rev
Log:
    * rivet/packages/dio/dio.tcl: various methods used as
    accessors to some property variables of the class Database were not returning their values
    as expeected. This also surfaced a bug in method 'string' where a result object wasn't
    used correctly. Method 'count' failed when no keyfield was set. Since it should be possible
    to call this method also when there is no keyfield defined private method table_check is 
    returning specific error codes making possible to catch this error and ignore 
    it in 'count' (fixed bugs #53733 and #53732)
    * rivet/packages/dio/dio_Sqlite.tcl: Class Sqlite did not set the variable 'interface' to
    value 'Sqlite' as expected.
    * doc/README: improved instruction for code examples inclusion into XML manual
    * doc/rivet-full.xml: removed
    * configure.ac: bumping up version number to 2.0.6
    * VERSION: new version number


Removed:
    tcl/rivet/branches/2.0/doc/rivet-full.xml
Modified:
    tcl/rivet/branches/2.0/ChangeLog
    tcl/rivet/branches/2.0/Makefile.in
    tcl/rivet/branches/2.0/VERSION
    tcl/rivet/branches/2.0/configure.ac
    tcl/rivet/branches/2.0/doc/README
    tcl/rivet/branches/2.0/rivet/packages/dio/dio.tcl
    tcl/rivet/branches/2.0/rivet/packages/dio/dio_Sqlite.tcl
    tcl/rivet/branches/2.0/rivet/pkgIndex.tcl

Modified: tcl/rivet/branches/2.0/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.0/ChangeLog?rev=1388920&r1=1388919&r2=1388920&view=diff
==============================================================================
--- tcl/rivet/branches/2.0/ChangeLog (original)
+++ tcl/rivet/branches/2.0/ChangeLog Sat Sep 22 23:05:55 2012
@@ -1,3 +1,22 @@
+2012-09-22 Massimo Manghi <mx...@apache.org>
+    * rivet/packages/dio/dio.tcl: various methods used as
+    accessors to some property variables of the class Database were not returning their values
+    as expeected. This also surfaced a bug in method 'string' where a result object wasn't
+    used correctly. Method 'count' failed when no keyfield was set. Since it should be possible
+    to call this method also when there is no keyfield defined private method table_check is 
+    returning specific error codes making possible to catch this error and ignore 
+    it in 'count' (fixed bugs #53733 and #53732)
+    * rivet/packages/dio/dio_Sqlite.tcl: Class Sqlite did not set the variable 'interface' to
+    value 'Sqlite' as expected.
+    * doc/README: improved instruction for code examples inclusion into XML manual
+    * doc/rivet-full.xml: removed
+    * configure.ac: bumping up version number to 2.0.6
+    * VERSION: new version number
+
+2012-09-18 Massimo Manghi <mx...@apache.org>
+    * rivet/pkgIndex.tcl: index file regenerated
+
+
 2012-09-16 Massimo Manghi <mx...@apache.org>
     * tests/runtests.tcl,tests/apachetest.tcl: User and Group directives removed from conffile
     template to make test suite independent from the output of command 'id' from which 

Modified: tcl/rivet/branches/2.0/Makefile.in
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.0/Makefile.in?rev=1388920&r1=1388919&r2=1388920&view=diff
==============================================================================
--- tcl/rivet/branches/2.0/Makefile.in (original)
+++ tcl/rivet/branches/2.0/Makefile.in Sat Sep 22 23:05:55 2012
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -25,6 +25,23 @@
 #             before invoking pkg_mkIndex.
 #
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -73,6 +90,11 @@ RECURSIVE_TARGETS = all-recursive check-
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@ -540,13 +562,10 @@ distdir: $(DISTFILES)
 	done
 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
 	    $(am__relativize); \
 	    new_distdir=$$reldir; \
@@ -632,7 +651,7 @@ distcheck: dist
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
-	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	chmod -R a-w $(distdir); chmod u+w $(distdir)
 	mkdir $(distdir)/_build
 	mkdir $(distdir)/_inst
 	chmod a-w $(distdir)

Modified: tcl/rivet/branches/2.0/VERSION
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.0/VERSION?rev=1388920&r1=1388919&r2=1388920&view=diff
==============================================================================
--- tcl/rivet/branches/2.0/VERSION (original)
+++ tcl/rivet/branches/2.0/VERSION Sat Sep 22 23:05:55 2012
@@ -1 +1 @@
-2.0.5
+2.0.6

Modified: tcl/rivet/branches/2.0/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.0/configure.ac?rev=1388920&r1=1388919&r2=1388920&view=diff
==============================================================================
--- tcl/rivet/branches/2.0/configure.ac (original)
+++ tcl/rivet/branches/2.0/configure.ac Sat Sep 22 23:05:55 2012
@@ -22,7 +22,7 @@ dnl
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([Rivet],[2.0.5])
+AC_INIT([Rivet],[2.0.6])
 TEA_INIT([3.9])
 
 AC_CONFIG_AUX_DIR(tclconfig)

Modified: tcl/rivet/branches/2.0/doc/README
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.0/doc/README?rev=1388920&r1=1388919&r2=1388920&view=diff
==============================================================================
--- tcl/rivet/branches/2.0/doc/README (original)
+++ tcl/rivet/branches/2.0/doc/README Sat Sep 22 23:05:55 2012
@@ -1,8 +1,27 @@
-$Id: $
+$Id: README 1388379 2012-09-21 08:54:28Z mxmanghi $
 
 Graphic files that are to be displayed in the manual must be in the doc/images/ directory. 
 Files in this directory are copied into the doc/html/images directory where they are referenced 
-by the html pages. Files are to be added to svn manually. References to this files must be relative
-to the manual root and therefore look like
+by the html pages. Files have to be added to svn manually. References to this files must be relative
+to the manual root and therefore they look like
 
 <graphic fileref="images/calendar.png" />
+
+Code examples can be put in their native form in 'doc/examples'. 
+Adding new examples to the documentation is a 4 step procedure now:
+
+ 1) Compile and install Rivet
+
+ 2) Create a new code example in the doc/examples directory. The file has to keep code
+in native form, i.e. capable to run when placed in your webspace.
+
+ 3) Run 'make examples'. This procedure will collect the files in 'examples' and store them
+escaped into 'examples-sgml'. Thus files in this directory are fit for inclusion in 
+XML/XHTML documentation
+
+ 4) Update the manual to add the reference to the newly generated example.
+
+
+ 
+
+ 

Modified: tcl/rivet/branches/2.0/rivet/packages/dio/dio.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.0/rivet/packages/dio/dio.tcl?rev=1388920&r1=1388919&r2=1388920&view=diff
==============================================================================
--- tcl/rivet/branches/2.0/rivet/packages/dio/dio.tcl (original)
+++ tcl/rivet/branches/2.0/rivet/packages/dio/dio.tcl Sat Sep 22 23:05:55 2012
@@ -299,7 +299,7 @@ proc handle {interface args} {
     #
     method string {req} {
 	set res [exec $req]
-	set val [$res next -list]
+	$res next -list val
 	$res destroy
 	return $val
     }
@@ -372,13 +372,14 @@ proc handle {interface args} {
 	::array set data $list
 
 	if {[lempty $data(-table)]} {
-	    return -code error "-table not specified in DIO object"
+	    return -code error -errorcode missing_table "-table not specified in DIO object"
 	}
+	set $tableVar $data(-table)
+
 	if {[lempty $data(-keyfield)]} {
-	    return -code error "-keyfield not specified in DIO object"
+	    return -code error -errorcode missing_keyfield "-keyfield not specified in DIO object"
 	}
 
-	set $tableVar $data(-table)
 	set $keyVar   $data(-keyfield)
     }
 
@@ -583,7 +584,18 @@ proc handle {interface args} {
     # count - return a count of the specified (or current) table.
     #
     method count {args} {
-	table_check $args
+
+        # table_check returns an error if either a keyfield or a table were not set. 
+        # In order to count the rows in a table we don't need a keyfield, so we check 
+        # if table_check is returning missing_table and in case we rethrow the error, 
+        # otherwise we continue 
+
+        if {[catch {table_check $args} e]} {
+            if {$e != "missing_keyfield"} {
+                return -code error -errorcode $e "error in table_check ($e)"
+            }
+        }
+
 	return [string "select count(*) from $myTable"]
     }
 
@@ -609,17 +621,17 @@ proc handle {interface args} {
     ##
     ## Functions to get and set public variables.
     ##
-    method interface {{string ""}} { configure_variable interface $string }
-    method errorinfo {{string ""}} { configure_variable errorinfo $string }
-    method db {{string ""}} { configure_variable db $string }
-    method table {{string ""}} { configure_variable table $string }
-    method keyfield {{string ""}} { configure_variable keyfield $string }
-    method autokey {{string ""}} { configure_variable autokey $string }
-    method sequence {{string ""}} { configure_variable sequence $string }
-    method user {{string ""}} { configure_variable user $string }
-    method pass {{string ""}} { configure_variable pass $string }
-    method host {{string ""}} { configure_variable host $string }
-    method port {{string ""}} { configure_variable port $string }
+    method interface {{string ""}} { return [configure_variable interface $string] }
+    method errorinfo {{string ""}} { return [configure_variable errorinfo $string] }
+    method db {{string ""}} { return [configure_variable db $string] }
+    method table {{string ""}} { return [configure_variable table $string] }
+    method keyfield {{string ""}} { return [configure_variable keyfield $string] }
+    method autokey {{string ""}} { return [configure_variable autokey $string] }
+    method sequence {{string ""}} { return [configure_variable sequence $string] }
+    method user {{string ""}} { return [configure_variable user $string] }
+    method pass {{string ""}} { return [configure_variable pass $string] }
+    method host {{string ""}} { return [configure_variable host $string] }
+    method port {{string ""}} { return [configure_variable port $string] }
 
     protected variable specialFields
 
@@ -787,14 +799,14 @@ proc handle {interface args} {
 	return [expr [lempty $list] == 0]
     }
 
-    method resultid {{string ""}} { configure_variable resultid $string }
-    method fields {{string ""}} { configure_variable fields $string }
-    method rowid {{string ""}} { configure_variable rowid $string }
-    method numrows {{string ""}} { configure_variable numrows $string }
-    method error {{string ""}} { configure_variable error $string }
-    method errorcode {{string ""}} { configure_variable errorcode $string }
-    method errorinfo {{string ""}} { configure_variable errorinfo $string }
-    method autocache {{string ""}} { configure_variable autocache $string }
+    method resultid {{string ""}} { return [configure_variable resultid $string] }
+    method fields {{string ""}} { return [configure_variable fields $string] }
+    method rowid {{string ""}} { return [configure_variable rowid $string] }
+    method numrows {{string ""}} { return [configure_variable numrows $string] }
+    method error {{string ""}} { return [configure_variable error $string] }
+    method errorcode {{string ""}} { return [configure_variable errorcode $string] }
+    method errorinfo {{string ""}} { return [configure_variable errorinfo $string] }
+    method autocache {{string ""}} { return [configure_variable autocache $string] }
 
     public variable resultid	""
     public variable fields	""

Modified: tcl/rivet/branches/2.0/rivet/packages/dio/dio_Sqlite.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.0/rivet/packages/dio/dio_Sqlite.tcl?rev=1388920&r1=1388919&r2=1388920&view=diff
==============================================================================
--- tcl/rivet/branches/2.0/rivet/packages/dio/dio_Sqlite.tcl (original)
+++ tcl/rivet/branches/2.0/rivet/packages/dio/dio_Sqlite.tcl Sat Sep 22 23:05:55 2012
@@ -26,7 +26,9 @@ namespace eval DIO {
     ::itcl::class Sqlite {
         inherit Database
 
-        private variable dbcmd ""
+        private variable dbcmd          ""
+	public  variable interface	"Sqlite"
+
         constructor {args} {eval configure $args} {
             if {[catch {package require sqlite}] && \
                 [catch {package require sqlite3}]} {

Modified: tcl/rivet/branches/2.0/rivet/pkgIndex.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.0/rivet/pkgIndex.tcl?rev=1388920&r1=1388919&r2=1388920&view=diff
==============================================================================
--- tcl/rivet/branches/2.0/rivet/pkgIndex.tcl (original)
+++ tcl/rivet/branches/2.0/rivet/pkgIndex.tcl Sat Sep 22 23:05:55 2012
@@ -8,9 +8,11 @@
 # script is sourced, the variable $dir must contain the
 # full path name of this file's directory.
 
+package ifneeded Calendar 1.0 [list source [file join $dir packages/calendar/calendar.tcl]]
 package ifneeded DIO 1.0 [list source [file join $dir packages/dio/dio.tcl]]
 package ifneeded DIODisplay 1.0 [list source [file join $dir packages/dio/diodisplay.tcl]]
 package ifneeded Dtcl 1.0 [list source [file join $dir packages/dtcl/dtcl.tcl]]
+package ifneeded RivetEntities 1.0 [list source [file join $dir packages/entities/entities.tcl]]
 package ifneeded RivetTcl 1.1 [list source [file join $dir init.tcl]]
 package ifneeded Session 1.0 [list source [file join $dir packages/session/session-class.tcl]]
 package ifneeded commserver 0.1 [list source [file join $dir packages/commserver/commserver.tcl]]



---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org