Fossil

Check-in [78da61db]
Login

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

Overview
Comment:Added documentation for the persistent state of pass I.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:78da61db0ef93a652fd267d20e034a9319ca4f2a
User & Date: aku 2007-10-05 07:07:51
Context
2007-10-05
07:08
Collapse multiple uses of a project path into one project. check-in: d174affb user: aku tags: trunk
07:07
Added documentation for the persistent state of pass I. check-in: 78da61db user: aku tags: trunk
06:50
Extended state handling with methods to declare usage and structure of state, started integration of state with pass I, collection of projects and files. check-in: fb1e36d2 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

43
44
45
46
47
48
49


















50
51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
    # # ## ### ##### ######## #############
    ## Public API

    typemethod setup {} {
	# Define names and structure of the persistent state of this
	# pass.



















	state writing project {
	    pid  INTEGER  NOT NULL  PRIMARY KEY AUTOINCREMENT,
	    name TEXT     NOT NULL  UNIQUE
	}
	state writing files {
	    fid     INTEGER  NOT NULL  PRIMARY KEY AUTOINCREMENT,
	    pid     INTEGER  NOT NULL  REFERENCES project,
	    name    TEXT     NOT NULL  UNIQUE,
	    visible TEXT     NOT NULL  UNIQUE

	}
	return
    }

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







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




|


|
|
>







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    # # ## ### ##### ######## #############
    ## Public API

    typemethod setup {} {
	# Define names and structure of the persistent state of this
	# pass.

	# We deal with repository projects, and the rcs archive files
	# in the projects.

	# For the first, projects, we keep their names, which are
	# their paths relative to the base directory of the whole
	# repository. These have to be globally unique, i.e. no two
	# projects can have the same name.

	# For the files we keep their names, which are their paths
	# relative to the base directory of the whole project! These
	# have to be unique within a project, however globally this
	# does not hold, a name may occur several times, in different
	# projects. We further store the user visible file name
	# associated with the rcs archive.

	# Both projects and files are identified by globally unique
	# integer ids, automatically assigned by the database.

	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] {