Artifact 116b688f6574565de447c795708a972c00e6be5d
File
tools/cvs2fossil/lib/c2f_project.tcl
part of check-in
[52f2254007]
- Continued work on pass I. Filled in the repository management, and basic implementation of project objects. Missing are persistence and the foundation for that (cache database).
by
aku on
2007-10-04 04:34:59.
## -*- 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
# # ## ### ##### ######## ############# #####################
## Project, part of a CVS repository. Multiple instances are possible.
# # ## ### ##### ######## ############# #####################
## Requirements
package require Tcl 8.4 ; # Required runtime.
package require snit ; # OO system.
# # ## ### ##### ######## ############# #####################
##
snit::type ::vc::fossil::import::cvs::project {
# # ## ### ##### ######## #############
## Public API
constructor {path} {
set mybase $path
return
}
method base {} { return $mybase }
method printbase {} {
if {$mybase eq ""} {return <Repository>}
return $mybase
}
method add {rcs usr} {
set myfiles($rcs) $usr
return
}
method files {} {
return [array names myfiles]
}
# # ## ### ##### ######## #############
## State
variable mybase {} ; # Project directory
variable myfiles -array {} ; # Maps rcss archive to their user files.
# # ## ### ##### ######## #############
## Internal methods
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 {
namespace export project
}
# # ## ### ##### ######## ############# #####################
## Ready
package provide vc::fossil::import::cvs::project 1.0
return