Fossil

Diff
Login

Differences From Artifact [0ad0b453d6]:

To Artifact [16136c408c]:


12
13
14
15
16
17
18
19
20

21
22
23
24
25
26
27

## File, part of a 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::file {
    # # ## ### ##### ######## #############
    ## Public API







|
|
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

## File, part of a project, part of a CVS repository. Multiple
## instances are possible.

# # ## ### ##### ######## ############# #####################
## Requirements

package require Tcl 8.4                             ; # Required runtime.
package require snit                                ; # OO system.
package require vc::fossil::import::cvs::repository ; # Repository management.

# # ## ### ##### ######## ############# #####################
## 

snit::type ::vc::fossil::import::cvs::file {
    # # ## ### ##### ######## #############
    ## Public API
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72







































73
74
75
76



77
78
79
80
81
82
83
84
85
86
87
88
89
90



91
92
93
94
95
96
97
    #method setcomment {c} {puts comment=$c}
    #method admindone {} {puts admindone}
    #method def {rev date author state next branches} {puts "def $rev $date $author $state $next $branches"}
    #method setdesc {d} {puts desc=$d}
    #method extend {rev commitmsg deltarange} {puts "extend $commitmsg $deltarange"}
    #method done {} {puts done}


    # # ## ### ##### ######## #############
    ## Persistence (pass II)

    method persist {} {
    }

    # # ## ### ##### ######## #############







































    ## State

    variable mypath    {} ; # Path of rcs archive
    variable myproject {} ; # Project object the file belongs to.




    # # ## ### ##### ######## #############
    ## 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 file



}

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

package provide vc::fossil::import::cvs::file 1.0
return







<







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


|
|
>
>
>














>
>
>







59
60
61
62
63
64
65

66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
    #method setcomment {c} {puts comment=$c}
    #method admindone {} {puts admindone}
    #method def {rev date author state next branches} {puts "def $rev $date $author $state $next $branches"}
    #method setdesc {d} {puts desc=$d}
    #method extend {rev commitmsg deltarange} {puts "extend $commitmsg $deltarange"}
    #method done {} {puts done}


    # # ## ### ##### ######## #############
    ## Persistence (pass II)

    method persist {} {
    }

    # # ## ### ##### ######## #############
    ## Implement the sink

    method begin     {} {}
    method done      {} {}
    method admindone {} {}

    method sethead {h} {
	set myhead $h
	return
    }

    method setprincipalbranch {b} {
	set myprincipal $b
	return
    }

    method setsymbols {dict} {
	# Slice symbols into branches and tags, canonical numbers ...
array set _ $dict
parray _
    }

    method setcomment {c} {# ignore}
    method setdesc    {d} {# ignore}

    method def {rev date author state next branches} {
	set myrev($rev) [list $date $author $state $next $branches]
	repository author $author
	return
    }

    method extend {rev commitmsg deltarange} {
	set cm [string trim $commitmsg]
	lappend myrev($rev) $cm $deltarange
	repository cmessage $cm
	return
    }

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

    variable mypath       {} ; # Path of rcs archive
    variable myproject    {} ; # Project object the file belongs to.
    variable myrev -array {} ; # All revisions and their connections.
    variable myhead       {} ; # Head revision    (rev number)
    variable myprincipal  {} ; # Principal branch (branch number)

    # # ## ### ##### ######## #############
    ## 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 file
    namespace eval file {
	namespace import ::vc::fossil::import::cvs::repository
    }
}

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

package provide vc::fossil::import::cvs::file 1.0
return