Artifact Content
Not logged in

Artifact 7dec41a873b3032639c9dab8749ca2fb6369c294

File tools/cvs2fossil/lib/c2f_ptrunk.tcl part of check-in [6f8667b03e] - Added code creating aggregate symbol statistics. This completes pass 2 (CollRev). by aku on 2007-10-31 03:44:01.

## -*- 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 mysymbol [$project getsymbol $myname]
	set myid     [$mysymbol id]
	return
    }

    destructor {
	$mysymbol destroy
    }

    method name    {} { return $myname }
    method id      {} { return $myid   }
    method istrunk {} { return 1 }
    method symbol  {} { return $self }

    method countasbranch {} {}
    method countastag    {} {}
    method countacommit  {} {}

    method blockedby      {symbol} {}
    method possibleparent {symbol} {}

    method isghost {} { return 0 }

    delegate method persistrev to mysymbol

    # # ## ### ##### ######## #############
    ## State

    typevariable myname   :trunk: ; # Name shared by all trunk symbols.
    variable     myid     {}      ; # The trunk's symbol id.
    variable     mysymbol {}      ; # The symbol underneath the trunk.

    # # ## ### ##### ######## #############
    ## Internal methods

    # # ## ### ##### ######## #############
    ## Configuration

    pragma -hastypeinfo    no  ; # no type introspection
    pragma -hasinfo        no  ; # no object introspection
    pragma -hastypemethods no  ; # type is not relevant.

    # # ## ### ##### ######## #############
}

namespace eval ::vc::fossil::import::cvs::project {
    namespace export trunk
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide vc::fossil::import::cvs::project::trunk 1.0
return