Fossil SCM

Added code for the loading of pass II data (currently only the smybols) from the state when pass II is skipped.

aku 2007-11-02 04:26 trunk
Commit c3d5104084f1efe90c40608171ef82969f7065de
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -8,20 +8,18 @@
88
# This software consists of voluntary contributions made by many
99
# individuals. For exact contribution history, see the revision
1010
# history and logs, available at http://fossil-scm.hwaci.com/fossil
1111
# # ## ### ##### ######## ############# #####################
1212
13
-## Pass II. This pass parses the colected rcs archives and extracts
13
+## Pass II. This pass parses the collected rcs archives and extracts
1414
## all the information they contain (revisions, and symbols).
1515
1616
# # ## ### ##### ######## ############# #####################
1717
## Requirements
1818
1919
package require Tcl 8.4 ; # Required runtime.
2020
package require snit ; # OO system.
21
-package require fileutil::traverse ; # Directory traversal.
22
-package require fileutil ; # File & path utilities.
2321
package require vc::tools::trouble ; # Error reporting.
2422
package require vc::tools::log ; # User feedback.
2523
package require vc::fossil::import::cvs::pass ; # Pass management.
2624
package require vc::fossil::import::cvs::repository ; # Repository management.
2725
package require vc::fossil::import::cvs::state ; # State storage.
@@ -176,11 +174,11 @@
176174
177175
state writing symbol {
178176
sid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
179177
pid INTEGER NOT NULL REFERENCES project, -- Project the symbol belongs to
180178
name TEXT NOT NULL,
181
- type INTEGER NOT NULL, -- enum { tag = 1, branch, undefined }
179
+ type INTEGER NOT NULL REFERENCES symtype, -- enum { excluded = 0, tag, branch, undefined }
182180
183181
tag_count INTEGER NOT NULL, -- How often the symbol is used as tag.
184182
branch_count INTEGER NOT NULL, -- How often the symbol is used as branch
185183
commit_count INTEGER NOT NULL, -- How often a file was committed on the symbol
186184
@@ -203,10 +201,22 @@
203201
sid INTEGER NOT NULL REFERENCES symbol, --
204202
pid INTEGER NOT NULL REFERENCES symbol, -- Possible parent of sid
205203
n INTEGER NOT NULL, -- How often pid can act as parent.
206204
UNIQUE (sid, pid)
207205
}
206
+
207
+ state writing symtype {
208
+ tid INTEGER NOT NULL PRIMARY KEY,
209
+ name TEXT NOT NULL,
210
+ UNIQUE (name)
211
+ }
212
+ state run {
213
+ INSERT INTO symtype VALUES (0,'excluded');
214
+ INSERT INTO symtype VALUES (1,'tag');
215
+ INSERT INTO symtype VALUES (2,'branch');
216
+ INSERT INTO symtype VALUES (3,'undefined');
217
+ }
208218
209219
state writing meta {
210220
-- Meta data of revisions. See revision.mid for the
211221
-- reference. Many revisions can share meta data. This is
212222
-- actually one of the criterions used to sort revisions
@@ -249,11 +259,13 @@
249259
250260
return
251261
}
252262
253263
typemethod load {} {
254
- # TODO
264
+ state reading symbol
265
+
266
+ repository loadsymbols
255267
return
256268
}
257269
258270
typemethod run {} {
259271
# Pass manager interface. Executed to perform the
@@ -313,10 +325,11 @@
313325
state discard tag
314326
state discard branch
315327
state discard symbol
316328
state discard blocker
317329
state discard parent
330
+ state discard symtype
318331
state discard meta
319332
state discard author
320333
state discard cmessage
321334
return
322335
}
323336
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -8,20 +8,18 @@
8 # This software consists of voluntary contributions made by many
9 # individuals. For exact contribution history, see the revision
10 # history and logs, available at http://fossil-scm.hwaci.com/fossil
11 # # ## ### ##### ######## ############# #####################
12
13 ## Pass II. This pass parses the colected rcs archives and extracts
14 ## all the information they contain (revisions, and symbols).
15
16 # # ## ### ##### ######## ############# #####################
17 ## Requirements
18
19 package require Tcl 8.4 ; # Required runtime.
20 package require snit ; # OO system.
21 package require fileutil::traverse ; # Directory traversal.
22 package require fileutil ; # File & path utilities.
23 package require vc::tools::trouble ; # Error reporting.
24 package require vc::tools::log ; # User feedback.
25 package require vc::fossil::import::cvs::pass ; # Pass management.
26 package require vc::fossil::import::cvs::repository ; # Repository management.
27 package require vc::fossil::import::cvs::state ; # State storage.
@@ -176,11 +174,11 @@
176
177 state writing symbol {
178 sid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
179 pid INTEGER NOT NULL REFERENCES project, -- Project the symbol belongs to
180 name TEXT NOT NULL,
181 type INTEGER NOT NULL, -- enum { tag = 1, branch, undefined }
182
183 tag_count INTEGER NOT NULL, -- How often the symbol is used as tag.
184 branch_count INTEGER NOT NULL, -- How often the symbol is used as branch
185 commit_count INTEGER NOT NULL, -- How often a file was committed on the symbol
186
@@ -203,10 +201,22 @@
203 sid INTEGER NOT NULL REFERENCES symbol, --
204 pid INTEGER NOT NULL REFERENCES symbol, -- Possible parent of sid
205 n INTEGER NOT NULL, -- How often pid can act as parent.
206 UNIQUE (sid, pid)
207 }
 
 
 
 
 
 
 
 
 
 
 
 
208
209 state writing meta {
210 -- Meta data of revisions. See revision.mid for the
211 -- reference. Many revisions can share meta data. This is
212 -- actually one of the criterions used to sort revisions
@@ -249,11 +259,13 @@
249
250 return
251 }
252
253 typemethod load {} {
254 # TODO
 
 
255 return
256 }
257
258 typemethod run {} {
259 # Pass manager interface. Executed to perform the
@@ -313,10 +325,11 @@
313 state discard tag
314 state discard branch
315 state discard symbol
316 state discard blocker
317 state discard parent
 
318 state discard meta
319 state discard author
320 state discard cmessage
321 return
322 }
323
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -8,20 +8,18 @@
8 # This software consists of voluntary contributions made by many
9 # individuals. For exact contribution history, see the revision
10 # history and logs, available at http://fossil-scm.hwaci.com/fossil
11 # # ## ### ##### ######## ############# #####################
12
13 ## Pass II. This pass parses the collected rcs archives and extracts
14 ## all the information they contain (revisions, and symbols).
15
16 # # ## ### ##### ######## ############# #####################
17 ## Requirements
18
19 package require Tcl 8.4 ; # Required runtime.
20 package require snit ; # OO system.
 
 
21 package require vc::tools::trouble ; # Error reporting.
22 package require vc::tools::log ; # User feedback.
23 package require vc::fossil::import::cvs::pass ; # Pass management.
24 package require vc::fossil::import::cvs::repository ; # Repository management.
25 package require vc::fossil::import::cvs::state ; # State storage.
@@ -176,11 +174,11 @@
174
175 state writing symbol {
176 sid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
177 pid INTEGER NOT NULL REFERENCES project, -- Project the symbol belongs to
178 name TEXT NOT NULL,
179 type INTEGER NOT NULL REFERENCES symtype, -- enum { excluded = 0, tag, branch, undefined }
180
181 tag_count INTEGER NOT NULL, -- How often the symbol is used as tag.
182 branch_count INTEGER NOT NULL, -- How often the symbol is used as branch
183 commit_count INTEGER NOT NULL, -- How often a file was committed on the symbol
184
@@ -203,10 +201,22 @@
201 sid INTEGER NOT NULL REFERENCES symbol, --
202 pid INTEGER NOT NULL REFERENCES symbol, -- Possible parent of sid
203 n INTEGER NOT NULL, -- How often pid can act as parent.
204 UNIQUE (sid, pid)
205 }
206
207 state writing symtype {
208 tid INTEGER NOT NULL PRIMARY KEY,
209 name TEXT NOT NULL,
210 UNIQUE (name)
211 }
212 state run {
213 INSERT INTO symtype VALUES (0,'excluded');
214 INSERT INTO symtype VALUES (1,'tag');
215 INSERT INTO symtype VALUES (2,'branch');
216 INSERT INTO symtype VALUES (3,'undefined');
217 }
218
219 state writing meta {
220 -- Meta data of revisions. See revision.mid for the
221 -- reference. Many revisions can share meta data. This is
222 -- actually one of the criterions used to sort revisions
@@ -249,11 +259,13 @@
259
260 return
261 }
262
263 typemethod load {} {
264 state reading symbol
265
266 repository loadsymbols
267 return
268 }
269
270 typemethod run {} {
271 # Pass manager interface. Executed to perform the
@@ -313,10 +325,11 @@
325 state discard tag
326 state discard branch
327 state discard symbol
328 state discard blocker
329 state discard parent
330 state discard symtype
331 state discard meta
332 state discard author
333 state discard cmessage
334 return
335 }
336
--- tools/cvs2fossil/lib/c2f_project.tcl
+++ tools/cvs2fossil/lib/c2f_project.tcl
@@ -77,10 +77,14 @@
7777
set mysymbol($name) \
7878
[sym %AUTO% $name [$myrepository defsymbol $myid $name] $self]
7979
}
8080
return $mysymbol($name)
8181
}
82
+
83
+ method hassymbol {name} {
84
+ return [info exists mysymbol($name)]
85
+ }
8286
8387
method purgeghostsymbols {} {
8488
set changes 1
8589
while {$changes} {
8690
set changes 0
8791
--- tools/cvs2fossil/lib/c2f_project.tcl
+++ tools/cvs2fossil/lib/c2f_project.tcl
@@ -77,10 +77,14 @@
77 set mysymbol($name) \
78 [sym %AUTO% $name [$myrepository defsymbol $myid $name] $self]
79 }
80 return $mysymbol($name)
81 }
 
 
 
 
82
83 method purgeghostsymbols {} {
84 set changes 1
85 while {$changes} {
86 set changes 0
87
--- tools/cvs2fossil/lib/c2f_project.tcl
+++ tools/cvs2fossil/lib/c2f_project.tcl
@@ -77,10 +77,14 @@
77 set mysymbol($name) \
78 [sym %AUTO% $name [$myrepository defsymbol $myid $name] $self]
79 }
80 return $mysymbol($name)
81 }
82
83 method hassymbol {name} {
84 return [info exists mysymbol($name)]
85 }
86
87 method purgeghostsymbols {} {
88 set changes 1
89 while {$changes} {
90 set changes 0
91
--- tools/cvs2fossil/lib/c2f_psym.tcl
+++ tools/cvs2fossil/lib/c2f_psym.tcl
@@ -37,10 +37,17 @@
3737
method name {} { return $myname }
3838
method id {} { return $myid }
3939
4040
# # ## ### ##### ######## #############
4141
## Symbol statistics
42
+
43
+ method defcounts {tc bc cc} {
44
+ set mybranchcount $tc
45
+ set mytagcount $bc
46
+ set mycommitcount $cc
47
+ return
48
+ }
4249
4350
method countasbranch {} { incr mybranchcount ; return }
4451
method countastag {} { incr mytagcount ; return }
4552
method countacommit {} { incr mycommitcount ; return }
4653
@@ -120,13 +127,15 @@
120127
121128
variable mypparent -array {} ; # Maps from symbols to the number
122129
# of files in which it could have
123130
# been a parent of this symbol.
124131
125
- typevariable mytag 1 ; # Code for symbols which are tags.
126
- typevariable mybranch 2 ; # Code for symbols which are branches.
127
- typevariable myundef 3 ; # Code for symbols of unknown type.
132
+ # Keep the codes below in sync with 'pass::collrev/setup('symtype').
133
+ typevariable myexcluded 0 ; # Code for symbols which are excluded.
134
+ typevariable mytag 1 ; # Code for symbols which are tags.
135
+ typevariable mybranch 2 ; # Code for symbols which are branches.
136
+ typevariable myundef 3 ; # Code for symbols of unknown type.
128137
129138
# # ## ### ##### ######## #############
130139
## Internal methods
131140
132141
# # ## ### ##### ######## #############
133142
--- tools/cvs2fossil/lib/c2f_psym.tcl
+++ tools/cvs2fossil/lib/c2f_psym.tcl
@@ -37,10 +37,17 @@
37 method name {} { return $myname }
38 method id {} { return $myid }
39
40 # # ## ### ##### ######## #############
41 ## Symbol statistics
 
 
 
 
 
 
 
42
43 method countasbranch {} { incr mybranchcount ; return }
44 method countastag {} { incr mytagcount ; return }
45 method countacommit {} { incr mycommitcount ; return }
46
@@ -120,13 +127,15 @@
120
121 variable mypparent -array {} ; # Maps from symbols to the number
122 # of files in which it could have
123 # been a parent of this symbol.
124
125 typevariable mytag 1 ; # Code for symbols which are tags.
126 typevariable mybranch 2 ; # Code for symbols which are branches.
127 typevariable myundef 3 ; # Code for symbols of unknown type.
 
 
128
129 # # ## ### ##### ######## #############
130 ## Internal methods
131
132 # # ## ### ##### ######## #############
133
--- tools/cvs2fossil/lib/c2f_psym.tcl
+++ tools/cvs2fossil/lib/c2f_psym.tcl
@@ -37,10 +37,17 @@
37 method name {} { return $myname }
38 method id {} { return $myid }
39
40 # # ## ### ##### ######## #############
41 ## Symbol statistics
42
43 method defcounts {tc bc cc} {
44 set mybranchcount $tc
45 set mytagcount $bc
46 set mycommitcount $cc
47 return
48 }
49
50 method countasbranch {} { incr mybranchcount ; return }
51 method countastag {} { incr mytagcount ; return }
52 method countacommit {} { incr mycommitcount ; return }
53
@@ -120,13 +127,15 @@
127
128 variable mypparent -array {} ; # Maps from symbols to the number
129 # of files in which it could have
130 # been a parent of this symbol.
131
132 # Keep the codes below in sync with 'pass::collrev/setup('symtype').
133 typevariable myexcluded 0 ; # Code for symbols which are excluded.
134 typevariable mytag 1 ; # Code for symbols which are tags.
135 typevariable mybranch 2 ; # Code for symbols which are branches.
136 typevariable myundef 3 ; # Code for symbols of unknown type.
137
138 # # ## ### ##### ######## #############
139 ## Internal methods
140
141 # # ## ### ##### ######## #############
142
--- tools/cvs2fossil/lib/c2f_ptrunk.tcl
+++ tools/cvs2fossil/lib/c2f_ptrunk.tcl
@@ -37,10 +37,14 @@
3737
3838
method name {} { return $myname }
3939
method id {} { return $myid }
4040
method istrunk {} { return 1 }
4141
method symbol {} { return $self }
42
+
43
+ method forceid {id} { set myid $id ; return }
44
+
45
+ method defcounts {tc bc cc} {}
4246
4347
method countasbranch {} {}
4448
method countastag {} {}
4549
method countacommit {} {}
4650
4751
--- tools/cvs2fossil/lib/c2f_ptrunk.tcl
+++ tools/cvs2fossil/lib/c2f_ptrunk.tcl
@@ -37,10 +37,14 @@
37
38 method name {} { return $myname }
39 method id {} { return $myid }
40 method istrunk {} { return 1 }
41 method symbol {} { return $self }
 
 
 
 
42
43 method countasbranch {} {}
44 method countastag {} {}
45 method countacommit {} {}
46
47
--- tools/cvs2fossil/lib/c2f_ptrunk.tcl
+++ tools/cvs2fossil/lib/c2f_ptrunk.tcl
@@ -37,10 +37,14 @@
37
38 method name {} { return $myname }
39 method id {} { return $myid }
40 method istrunk {} { return 1 }
41 method symbol {} { return $self }
42
43 method forceid {id} { set myid $id ; return }
44
45 method defcounts {tc bc cc} {}
46
47 method countasbranch {} {}
48 method countastag {} {}
49 method countacommit {} {}
50
51
--- tools/cvs2fossil/lib/c2f_repository.tcl
+++ tools/cvs2fossil/lib/c2f_repository.tcl
@@ -138,23 +138,25 @@
138138
}
139139
return
140140
}
141141
142142
typemethod load {} {
143
- array set pr {}
144143
state transaction {
145144
foreach {pid name} [state run {
146145
SELECT pid, name FROM project ;
147146
}] {
147
+ set project [project %AUTO% $name $type]
148
+
148149
lappend myprojpaths $name
149
- lappend myprojects [set pr($pid) [project %AUTO% $name $type]]
150
- $pr($pid) setid $pid
150
+ lappend myprojects $project
151
+ set myprojmap($pid) $project
152
+ $project setid $pid
151153
}
152154
foreach {fid pid name visible exec} [state run {
153155
SELECT fid, pid, name, visible, exec FROM file ;
154156
}] {
155
- $pr($pid) addfile $name $visible $exec $fid
157
+ $myprojmap($pid) addfile $name $visible $exec $fid
156158
}
157159
}
158160
return
159161
}
160162
@@ -176,19 +178,53 @@
176178
SaveMeta
177179
foreach p [TheProjects] { $p persistrev }
178180
}
179181
return
180182
}
183
+
184
+ typemethod loadsymbols {} {
185
+ state transaction {
186
+ # We load the symbol ids at large to have the mapping
187
+ # right from the beginning.
188
+
189
+ foreach {sid pid name tc bc cc} [state run {
190
+ SELECT sid, pid, name, tag_count, branch_count, commit_count
191
+ FROM symbol
192
+ ;
193
+ }] {
194
+ $mysymbol map $sid [list $pid $name]
195
+ set project $myprojmap($pid)
196
+
197
+ set force [$project hassymbol $name]
198
+ set symbol [$project getsymbol $name]
199
+
200
+ # Forcing happens only for the trunks.
201
+ if {$force} { $symbol forceid $sid }
202
+
203
+ # Set the loaded counts.
204
+ $symbol defcounts $tc $bc $cc
205
+
206
+ # Note: The type is neither retrieved nor set, for
207
+ # this is used to load the pass II data, which means
208
+ # that everything is 'undefined' at this point anyway.
209
+
210
+ # future: $symbol load (blockers, and parents)
211
+ }
212
+ }
213
+ return
214
+ }
181215
182216
# # ## ### ##### ######## #############
183217
## State
184218
185219
typevariable mybase {} ; # Base path to CVS repository.
186220
typevariable myprojpaths {} ; # List of paths to all declared
187221
# projects, relative to mybase.
188222
typevariable myprojects {} ; # List of objects for all
189223
# declared projects.
224
+ typevariable myprojmap -array {} ; # Map from project ids to their
225
+ # objects.
190226
typevariable myauthor {} ; # Names of all authors found,
191227
# maps to their ids.
192228
typevariable mycmsg {} ; # All commit messages found,
193229
# maps to their ids.
194230
typevariable mymeta {} ; # Maps all meta data tuples
195231
--- tools/cvs2fossil/lib/c2f_repository.tcl
+++ tools/cvs2fossil/lib/c2f_repository.tcl
@@ -138,23 +138,25 @@
138 }
139 return
140 }
141
142 typemethod load {} {
143 array set pr {}
144 state transaction {
145 foreach {pid name} [state run {
146 SELECT pid, name FROM project ;
147 }] {
 
 
148 lappend myprojpaths $name
149 lappend myprojects [set pr($pid) [project %AUTO% $name $type]]
150 $pr($pid) setid $pid
 
151 }
152 foreach {fid pid name visible exec} [state run {
153 SELECT fid, pid, name, visible, exec FROM file ;
154 }] {
155 $pr($pid) addfile $name $visible $exec $fid
156 }
157 }
158 return
159 }
160
@@ -176,19 +178,53 @@
176 SaveMeta
177 foreach p [TheProjects] { $p persistrev }
178 }
179 return
180 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
182 # # ## ### ##### ######## #############
183 ## State
184
185 typevariable mybase {} ; # Base path to CVS repository.
186 typevariable myprojpaths {} ; # List of paths to all declared
187 # projects, relative to mybase.
188 typevariable myprojects {} ; # List of objects for all
189 # declared projects.
 
 
190 typevariable myauthor {} ; # Names of all authors found,
191 # maps to their ids.
192 typevariable mycmsg {} ; # All commit messages found,
193 # maps to their ids.
194 typevariable mymeta {} ; # Maps all meta data tuples
195
--- tools/cvs2fossil/lib/c2f_repository.tcl
+++ tools/cvs2fossil/lib/c2f_repository.tcl
@@ -138,23 +138,25 @@
138 }
139 return
140 }
141
142 typemethod load {} {
 
143 state transaction {
144 foreach {pid name} [state run {
145 SELECT pid, name FROM project ;
146 }] {
147 set project [project %AUTO% $name $type]
148
149 lappend myprojpaths $name
150 lappend myprojects $project
151 set myprojmap($pid) $project
152 $project setid $pid
153 }
154 foreach {fid pid name visible exec} [state run {
155 SELECT fid, pid, name, visible, exec FROM file ;
156 }] {
157 $myprojmap($pid) addfile $name $visible $exec $fid
158 }
159 }
160 return
161 }
162
@@ -176,19 +178,53 @@
178 SaveMeta
179 foreach p [TheProjects] { $p persistrev }
180 }
181 return
182 }
183
184 typemethod loadsymbols {} {
185 state transaction {
186 # We load the symbol ids at large to have the mapping
187 # right from the beginning.
188
189 foreach {sid pid name tc bc cc} [state run {
190 SELECT sid, pid, name, tag_count, branch_count, commit_count
191 FROM symbol
192 ;
193 }] {
194 $mysymbol map $sid [list $pid $name]
195 set project $myprojmap($pid)
196
197 set force [$project hassymbol $name]
198 set symbol [$project getsymbol $name]
199
200 # Forcing happens only for the trunks.
201 if {$force} { $symbol forceid $sid }
202
203 # Set the loaded counts.
204 $symbol defcounts $tc $bc $cc
205
206 # Note: The type is neither retrieved nor set, for
207 # this is used to load the pass II data, which means
208 # that everything is 'undefined' at this point anyway.
209
210 # future: $symbol load (blockers, and parents)
211 }
212 }
213 return
214 }
215
216 # # ## ### ##### ######## #############
217 ## State
218
219 typevariable mybase {} ; # Base path to CVS repository.
220 typevariable myprojpaths {} ; # List of paths to all declared
221 # projects, relative to mybase.
222 typevariable myprojects {} ; # List of objects for all
223 # declared projects.
224 typevariable myprojmap -array {} ; # Map from project ids to their
225 # objects.
226 typevariable myauthor {} ; # Names of all authors found,
227 # maps to their ids.
228 typevariable mycmsg {} ; # All commit messages found,
229 # maps to their ids.
230 typevariable mymeta {} ; # Maps all meta data tuples
231
--- tools/cvs2fossil/lib/id.tcl
+++ tools/cvs2fossil/lib/id.tcl
@@ -32,10 +32,16 @@
3232
set mydata($key) $mycounter
3333
set myinvert($mycounter) $key
3434
3535
return $mycounter
3636
}
37
+
38
+ # Explicitly load the database with a mapping.
39
+ method map {id key} {
40
+ set mydata($key) $id
41
+ set myinvert($id) $key
42
+ }
3743
3844
method keyof {id} { return $myinvert($id) }
3945
method get {} { return [array get mydata] }
4046
4147
# # ## ### ##### ######## #############
4248
--- tools/cvs2fossil/lib/id.tcl
+++ tools/cvs2fossil/lib/id.tcl
@@ -32,10 +32,16 @@
32 set mydata($key) $mycounter
33 set myinvert($mycounter) $key
34
35 return $mycounter
36 }
 
 
 
 
 
 
37
38 method keyof {id} { return $myinvert($id) }
39 method get {} { return [array get mydata] }
40
41 # # ## ### ##### ######## #############
42
--- tools/cvs2fossil/lib/id.tcl
+++ tools/cvs2fossil/lib/id.tcl
@@ -32,10 +32,16 @@
32 set mydata($key) $mycounter
33 set myinvert($mycounter) $key
34
35 return $mycounter
36 }
37
38 # Explicitly load the database with a mapping.
39 method map {id key} {
40 set mydata($key) $id
41 set myinvert($id) $key
42 }
43
44 method keyof {id} { return $myinvert($id) }
45 method get {} { return [array get mydata] }
46
47 # # ## ### ##### ######## #############
48

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button