Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Moved the code loading changesets from state to its proper class. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
49dd66f64fc236df7de37abbee1888f3 |
| User & Date: | aku 2008-01-30 03:23:02.000 |
Context
|
2008-01-30
| ||
| 08:20 | Extended log writing to handle multi-line log messages. ... (check-in: 81a297a66a user: aku tags: trunk) | |
| 03:23 | Moved the code loading changesets from state to its proper class. ... (check-in: 49dd66f64f user: aku tags: trunk) | |
| 03:10 | Fixed the names for the case-sensitive file operations. ... (check-in: ed13b28b13 user: aku tags: trunk) | |
Changes
Changes to tools/cvs2fossil/lib/c2f_pinitcsets.tcl.
| ︙ | ︙ | |||
108 109 110 111 112 113 114 | # this pass into memory when this pass is skipped instead of # executed. state use changeset state use csitem state use cstype | | | > < | < < < < < < < < < < < < < < < < < < | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# this pass into memory when this pass is skipped instead of
# executed.
state use changeset
state use csitem
state use cstype
# Need the types first, the constructor used inside of the
# 'load' below uses them to assert the correctness of type
# names.
project::rev getcstypes
project::rev load
project::rev loadcounter
return
}
typemethod run {} {
# Pass manager interface. Executed to perform the
# functionality of the pass.
|
| ︙ | ︙ |
Changes to tools/cvs2fossil/lib/c2f_prev.tcl.
| ︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
package require Tcl 8.4 ; # Required runtime.
package require snit ; # OO system.
package require struct::set ; # Set operations.
package require vc::tools::misc ; # Text formatting
package require vc::tools::trouble ; # Error reporting.
package require vc::tools::log ; # User feedback.
package require vc::fossil::import::cvs::state ; # State storage.
package require vc::fossil::import::cvs::integrity ; # State integrity checks.
# # ## ### ##### ######## ############# #####################
##
snit::type ::vc::fossil::import::cvs::project::rev {
| > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
package require Tcl 8.4 ; # Required runtime.
package require snit ; # OO system.
package require struct::set ; # Set operations.
package require vc::tools::misc ; # Text formatting
package require vc::tools::trouble ; # Error reporting.
package require vc::tools::log ; # User feedback.
package require vc::fossil::import::cvs::repository ; # Repository management.
package require vc::fossil::import::cvs::state ; # State storage.
package require vc::fossil::import::cvs::integrity ; # State integrity checks.
# # ## ### ##### ######## ############# #####################
##
snit::type ::vc::fossil::import::cvs::project::rev {
|
| ︙ | ︙ | |||
546 547 548 549 550 551 552 553 554 555 |
typemethod getcstypes {} {
foreach {tid name} [state run {
SELECT tid, name FROM cstype;
}] { set mycstype($name) $tid }
return
}
typemethod loadcounter {} {
# Initialize the counter from the state
| > > > > > > > > > > > > > > > > > > > > > | | 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 |
typemethod getcstypes {} {
foreach {tid name} [state run {
SELECT tid, name FROM cstype;
}] { set mycstype($name) $tid }
return
}
typemethod load {} {
set n 0
log write 2 csets {Loading the changesets}
foreach {id pid cstype srcid} [state run {
SELECT C.cid, C.pid, CS.name, C.src
FROM changeset C, cstype CS
WHERE C.type = CS.tid
ORDER BY C.cid
}] {
log progress 2 csets $n {}
set r [$type %AUTO% [repository projectof $pid] $cstype $srcid [state run {
SELECT C.iid
FROM csitem C
WHERE C.cid = $id
ORDER BY C.pos
}] $id]
incr n
}
return
}
typemethod loadcounter {} {
# Initialize the counter from the state
log write 2 csets {Loading changeset counter}
set mycounter [state one { SELECT MAX(cid) FROM changeset }]
return
}
typemethod num {} { return $mycounter }
proc InitializeBreakState {revisions} {
|
| ︙ | ︙ | |||
1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 |
# # ## ### ##### ######## ############# #####################
##
namespace eval ::vc::fossil::import::cvs::project {
namespace export rev
namespace eval rev {
namespace import ::vc::fossil::import::cvs::state
namespace import ::vc::fossil::import::cvs::integrity
namespace import ::vc::tools::misc::*
namespace import ::vc::tools::trouble
namespace import ::vc::tools::log
log register csets
| > | 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 |
# # ## ### ##### ######## ############# #####################
##
namespace eval ::vc::fossil::import::cvs::project {
namespace export rev
namespace eval rev {
namespace import ::vc::fossil::import::cvs::repository
namespace import ::vc::fossil::import::cvs::state
namespace import ::vc::fossil::import::cvs::integrity
namespace import ::vc::tools::misc::*
namespace import ::vc::tools::trouble
namespace import ::vc::tools::log
log register csets
|
| ︙ | ︙ |