Artifact 186b2dcb0d57d97751c29023c9bc648c911b3fe5
File
tools/cvs2fossil/lib/c2f_ptrunk.tcl
part of check-in
[2c08006d9d]
- Changed the coding of trunk symbols. Using NULL makes for difficult comparisons later when doing integrity checks. Each trunk now has a regular unique id as a symbol. Added documentation to the table definitions, about references, constraints, etc.
by
aku on
2007-10-25 05:13:41.
## -*- tcl -*-
# # ## ### ##### ######## ############# #####################
## Copyright (c) 2007 Andreas Kupries.
#
# This software is licensed as described in the file LICENSE, which
# you should have received as part of this distribution.
#
# This software consists of voluntary contributions made by many
# individuals. For exact contribution history, see the revision
# history and logs, available at http://fossil-scm.hwaci.com/fossil
# # ## ### ##### ######## ############# #####################
## Trunk, the special main line of development in a project.
# # ## ### ##### ######## ############# #####################
## Requirements
package require Tcl 8.4 ; # Required runtime.
package require snit ; # OO system.
# # ## ### ##### ######## ############# #####################
##
snit::type ::vc::fossil::import::cvs::project::trunk {
# # ## ### ##### ######## #############
## Public API
constructor {project} {
set myid [[$project getsymbol $myname] id]
return
}
method name {} { return $myname }
method id {} { return $myid }
method istrunk {} { return 1 }
# # ## ### ##### ######## #############
## State
typevariable myname :trunk: ; # Name shared by all trunk symbols.
variable myid {} ; # The trunk's symbol id.
# # ## ### ##### ######## #############
## Internal methods
# # ## ### ##### ######## #############
## Configuration
pragma -hastypeinfo no ; # no type introspection
pragma -hasinfo no ; # no object introspection
pragma -hastypemethods no ; # type is not relevant.
pragma -simpledispatch yes ; # simple fast dispatch
# # ## ### ##### ######## #############
}
namespace eval ::vc::fossil::import::cvs::project {
namespace export trunk
}
# # ## ### ##### ######## ############# #####################
## Ready
package provide vc::fossil::import::cvs::project::trunk 1.0
return