44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
+
-
+
-
-
-
-
-
|
#method begin {} {puts begin}
#method sethead {h} {puts head=$h}
#method setprincipalbranch {b} {puts pb=$b}
#method deftag {s r} {puts $s=$r}
#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 defdone {} {puts def-done}
#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 begin {} {#ignore}
method done {} {}
method admindone {} {
# We do nothing at the boundary of admin and revision data
}
method sethead {revnr} {
set myhead $revnr
return
}
method setprincipalbranch {branchnr} {
|
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
|
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
|
-
+
+
+
+
+
+
+
+
+
|
} else {
$self AddTag $name $revnr
}
return
}
method setcomment {c} {# ignore}
method setdesc {d} {# ignore}
method admindone {} {
# We do nothing at the boundary of admin and revision data
}
method def {revnr date author state next branches} {
$self LookForUnlabeledBranches $branches
$myproject author $author
if {[info exists myrev($revnr)]} {
trouble fatal "File $mypath contains duplicate definitions for revision $revnr."
return
}
set myrev($revnr) [rev %AUTO% $revnr $date $author $state $self]
RecordBasicDependencies $revnr $next
return
}
method defdone {} {
}
method setdesc {d} {# ignore}
method extend {revnr commitmsg deltarange} {
set cm [string trim $commitmsg]
$myproject cmessage $cm
set rev $myrev($revnr)
if {[$rev hascommitmsg]} {
|
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
+
+
|
# Here we also keep track of the order in which the revisions
# were added to the file.
lappend myrevisions $rev
return
}
method done {} {}
# # ## ### ##### ######## #############
## State
variable mypath {} ; # Path of rcs archive
variable myproject {} ; # Project object the file belongs to.
variable myrev -array {} ; # All revisions and their connections.
|