Fossil SCM
Added documentation for the persistent state of pass I.
Commit
78da61db0ef93a652fd267d20e034a9319ca4f2a
Parent
fb1e36d29079d02…
1 file changed
+22
-3
+22
-3
| --- tools/cvs2fossil/lib/c2f_pcollar.tcl | ||
| +++ tools/cvs2fossil/lib/c2f_pcollar.tcl | ||
| @@ -45,19 +45,38 @@ | ||
| 45 | 45 | |
| 46 | 46 | typemethod setup {} { |
| 47 | 47 | # Define names and structure of the persistent state of this |
| 48 | 48 | # pass. |
| 49 | 49 | |
| 50 | + # We deal with repository projects, and the rcs archive files | |
| 51 | + # in the projects. | |
| 52 | + | |
| 53 | + # For the first, projects, we keep their names, which are | |
| 54 | + # their paths relative to the base directory of the whole | |
| 55 | + # repository. These have to be globally unique, i.e. no two | |
| 56 | + # projects can have the same name. | |
| 57 | + | |
| 58 | + # For the files we keep their names, which are their paths | |
| 59 | + # relative to the base directory of the whole project! These | |
| 60 | + # have to be unique within a project, however globally this | |
| 61 | + # does not hold, a name may occur several times, in different | |
| 62 | + # projects. We further store the user visible file name | |
| 63 | + # associated with the rcs archive. | |
| 64 | + | |
| 65 | + # Both projects and files are identified by globally unique | |
| 66 | + # integer ids, automatically assigned by the database. | |
| 67 | + | |
| 50 | 68 | state writing project { |
| 51 | 69 | pid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, |
| 52 | 70 | name TEXT NOT NULL UNIQUE |
| 53 | 71 | } |
| 54 | - state writing files { | |
| 72 | + state writing file { | |
| 55 | 73 | fid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, |
| 56 | 74 | pid INTEGER NOT NULL REFERENCES project, |
| 57 | - name TEXT NOT NULL UNIQUE, | |
| 58 | - visible TEXT NOT NULL UNIQUE | |
| 75 | + name TEXT NOT NULL, | |
| 76 | + visible TEXT NOT NULL, | |
| 77 | + UNIQUE (pid, name) | |
| 59 | 78 | } |
| 60 | 79 | return |
| 61 | 80 | } |
| 62 | 81 | |
| 63 | 82 | typemethod run {} { |
| 64 | 83 |
| --- tools/cvs2fossil/lib/c2f_pcollar.tcl | |
| +++ tools/cvs2fossil/lib/c2f_pcollar.tcl | |
| @@ -45,19 +45,38 @@ | |
| 45 | |
| 46 | typemethod setup {} { |
| 47 | # Define names and structure of the persistent state of this |
| 48 | # pass. |
| 49 | |
| 50 | state writing project { |
| 51 | pid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, |
| 52 | name TEXT NOT NULL UNIQUE |
| 53 | } |
| 54 | state writing files { |
| 55 | fid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, |
| 56 | pid INTEGER NOT NULL REFERENCES project, |
| 57 | name TEXT NOT NULL UNIQUE, |
| 58 | visible TEXT NOT NULL UNIQUE |
| 59 | } |
| 60 | return |
| 61 | } |
| 62 | |
| 63 | typemethod run {} { |
| 64 |
| --- tools/cvs2fossil/lib/c2f_pcollar.tcl | |
| +++ tools/cvs2fossil/lib/c2f_pcollar.tcl | |
| @@ -45,19 +45,38 @@ | |
| 45 | |
| 46 | typemethod setup {} { |
| 47 | # Define names and structure of the persistent state of this |
| 48 | # pass. |
| 49 | |
| 50 | # We deal with repository projects, and the rcs archive files |
| 51 | # in the projects. |
| 52 | |
| 53 | # For the first, projects, we keep their names, which are |
| 54 | # their paths relative to the base directory of the whole |
| 55 | # repository. These have to be globally unique, i.e. no two |
| 56 | # projects can have the same name. |
| 57 | |
| 58 | # For the files we keep their names, which are their paths |
| 59 | # relative to the base directory of the whole project! These |
| 60 | # have to be unique within a project, however globally this |
| 61 | # does not hold, a name may occur several times, in different |
| 62 | # projects. We further store the user visible file name |
| 63 | # associated with the rcs archive. |
| 64 | |
| 65 | # Both projects and files are identified by globally unique |
| 66 | # integer ids, automatically assigned by the database. |
| 67 | |
| 68 | state writing project { |
| 69 | pid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, |
| 70 | name TEXT NOT NULL UNIQUE |
| 71 | } |
| 72 | state writing file { |
| 73 | fid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, |
| 74 | pid INTEGER NOT NULL REFERENCES project, |
| 75 | name TEXT NOT NULL, |
| 76 | visible TEXT NOT NULL, |
| 77 | UNIQUE (pid, name) |
| 78 | } |
| 79 | return |
| 80 | } |
| 81 | |
| 82 | typemethod run {} { |
| 83 |