Check-in [10f9d51bb2]
Not logged in
Overview

SHA1 Hash:10f9d51bb2ae7825c84db019587d8bb80654999a
Date: 2007-10-06 03:55:06
User: aku
Comment:Added documentation to state definition, and debugging output to the state system itself.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified tools/cvs2fossil/lib/c2f_pcollar.tcl from [983f456f59] to [e8bf2c5266].

@@ -69,14 +69,14 @@
 	    pid  INTEGER  NOT NULL  PRIMARY KEY AUTOINCREMENT,
 	    name TEXT     NOT NULL  UNIQUE
 	}
 	state writing file {
 	    fid     INTEGER  NOT NULL  PRIMARY KEY AUTOINCREMENT,
-	    pid     INTEGER  NOT NULL  REFERENCES project,
+	    pid     INTEGER  NOT NULL  REFERENCES project,       -- project the file belongs to
 	    name    TEXT     NOT NULL,
 	    visible TEXT     NOT NULL,
-	    UNIQUE (pid, name)
+	    UNIQUE (pid, name)         -- file names are unique within a project
 	}
 	return
     }
 
     typemethod run {} {

Modified tools/cvs2fossil/lib/c2f_state.tcl from [4f1e5d7899] to [e652a4a126].

@@ -98,18 +98,22 @@
     typemethod writing {name definition} {
 	# Method for a user to declare a table its needs for storing
 	# persistent state, and the expected structure. A possibly
 	# previously existing definition is dropped.
 
+	log write 0 state "writing $name" ; # TODO move to level 5 or so
+
 	$mystate transaction {
 	    catch { $mystate eval "DROP TABLE $name" }
 	    $mystate eval "CREATE TABLE $name ( $definition )"
 	}
 	return
     }
 
     typemethod reading {name} {
+	log write 0 state "reading $name" ; # TODO move to level 5 or so
+
 	# Method for a user to declare a table it wishes to read
 	# from. A missing table is an internal error causing an
 	# immediate exit.
 
 	set found [llength [$mystate eval {