Fossil SCM

fossil-scm / tools / cvs2fossil / lib / c2f_ptrunk.tcl
Blame History Raw 90 lines
1
## -*- tcl -*-
2
# # ## ### ##### ######## ############# #####################
3
## Copyright (c) 2007-2008 Andreas Kupries.
4
#
5
# This software is licensed as described in the file LICENSE, which
6
# you should have received as part of this distribution.
7
#
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
## Trunk, the special main line of development in a project.
14
15
# # ## ### ##### ######## ############# #####################
16
## Requirements
17
18
package require Tcl 8.4 ; # Required runtime.
19
package require snit ; # OO system.
20
21
# # ## ### ##### ######## ############# #####################
22
##
23
24
snit::type ::vc::fossil::import::cvs::project::trunk {
25
# # ## ### ##### ######## #############
26
## Public API
27
28
constructor {project} {
29
set mysymbol [$project getsymbol $myname]
30
set myid [$mysymbol id]
31
return
32
}
33
34
destructor {
35
$mysymbol destroy
36
}
37
38
method name {} { return $myname }
39
method id {} { return $myid }
40
method istrunk {} { return 1 }
41
method symbol {} { return $self }
42
method parent {} { return $self }
43
44
method forceid {id} { set myid $id ; return }
45
46
method defcounts {tc bc cc} {}
47
48
method countasbranch {} {}
49
method countastag {} {}
50
method countacommit {} {}
51
52
method blockedby {symbol} {}
53
method possibleparent {symbol} {}
54
55
method isghost {} { return 0 }
56
57
delegate method persistrev to mysymbol
58
59
method determinetype {} { $mysymbol markthetrunk }
60
61
# # ## ### ##### ######## #############
62
## State
63
64
typevariable myname :trunk: ; # Name shared by all trunk symbols.
65
variable myid {} ; # The trunk's symbol id.
66
variable mysymbol {} ; # The symbol underneath the trunk.
67
68
# # ## ### ##### ######## #############
69
## Internal methods
70
71
# # ## ### ##### ######## #############
72
## Configuration
73
74
pragma -hastypeinfo no ; # no type introspection
75
pragma -hasinfo no ; # no object introspection
76
pragma -hastypemethods no ; # type is not relevant.
77
78
# # ## ### ##### ######## #############
79
}
80
81
namespace eval ::vc::fossil::import::cvs::project {
82
namespace export trunk
83
}
84
85
# # ## ### ##### ######## ############# #####################
86
## Ready
87
88
package provide vc::fossil::import::cvs::project::trunk 1.0
89
return
90

Keyboard Shortcuts

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