Fossil

Check-in [10f9d51b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added documentation to state definition, and debugging output to the state system itself.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:10f9d51bb2ae7825c84db019587d8bb80654999a
User & Date: aku 2007-10-06 03:55:06
Context
2007-10-06
03:56
Added pass II (collection of revision and symbols), basic skeleton and state definitions, and integrated into the pass manager. check-in: fdbc01df user: aku tags: trunk
03:55
Added documentation to state definition, and debugging output to the state system itself. check-in: 10f9d51b user: aku tags: trunk
03:53
Better formatting for --help-passes, align codes. check-in: 43d72c62 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tools/cvs2fossil/lib/c2f_pcollar.tcl.

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

	state writing project {
	    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,
	    name    TEXT     NOT NULL,
	    visible TEXT     NOT NULL,
	    UNIQUE (pid, name)
	}
	return
    }

    typemethod run {} {
	set rbase [repository base?]
	foreach project [repository projects] {







|


|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

	state writing project {
	    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,       -- project the file belongs to
	    name    TEXT     NOT NULL,
	    visible TEXT     NOT NULL,
	    UNIQUE (pid, name)         -- file names are unique within a project
	}
	return
    }

    typemethod run {} {
	set rbase [repository base?]
	foreach project [repository projects] {

Changes to tools/cvs2fossil/lib/c2f_state.tcl.

96
97
98
99
100
101
102


103
104
105
106
107
108
109
110


111
112
113
114
115
116
117
    }

    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.



	$mystate transaction {
	    catch { $mystate eval "DROP TABLE $name" }
	    $mystate eval "CREATE TABLE $name ( $definition )"
	}
	return
    }

    typemethod reading {name} {


	# 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 {
	    SELECT name
	    FROM sqlite_master







>
>








>
>







96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
    }

    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 {
	    SELECT name
	    FROM sqlite_master