Fossil SCM

Extended rcs parser with another callback run after the processing of the revision tree completed, before starting on description and delta texts. Updated file class to intercept the callback.

aku 2007-10-12 07:20 trunk
Commit 40eaf58ec7e1d54971d6eca97bd66734a6804578
--- tools/cvs2fossil/lib/c2f_file.tcl
+++ tools/cvs2fossil/lib/c2f_file.tcl
@@ -46,10 +46,11 @@
4646
#method setprincipalbranch {b} {puts pb=$b}
4747
#method deftag {s r} {puts $s=$r}
4848
#method setcomment {c} {puts comment=$c}
4949
#method admindone {} {puts admindone}
5050
#method def {rev date author state next branches} {puts "def $rev $date $author $state $next $branches"}
51
+ #method defdone {} {puts def-done}
5152
#method setdesc {d} {puts desc=$d}
5253
#method extend {rev commitmsg deltarange} {puts "extend $commitmsg $deltarange"}
5354
#method done {} {puts done}
5455
5556
# # ## ### ##### ######## #############
@@ -59,16 +60,11 @@
5960
}
6061
6162
# # ## ### ##### ######## #############
6263
## Implement the sink
6364
64
- method begin {} {}
65
- method done {} {}
66
-
67
- method admindone {} {
68
- # We do nothing at the boundary of admin and revision data
69
- }
65
+ method begin {} {#ignore}
7066
7167
method sethead {revnr} {
7268
set myhead $revnr
7369
return
7470
}
@@ -95,11 +91,14 @@
9591
}
9692
return
9793
}
9894
9995
method setcomment {c} {# ignore}
100
- method setdesc {d} {# ignore}
96
+
97
+ method admindone {} {
98
+ # We do nothing at the boundary of admin and revision data
99
+ }
101100
102101
method def {revnr date author state next branches} {
103102
$self LookForUnlabeledBranches $branches
104103
$myproject author $author
105104
@@ -112,10 +111,15 @@
112111
113112
RecordBasicDependencies $revnr $next
114113
return
115114
}
116115
116
+ method defdone {} {
117
+ }
118
+
119
+ method setdesc {d} {# ignore}
120
+
117121
method extend {revnr commitmsg deltarange} {
118122
set cm [string trim $commitmsg]
119123
$myproject cmessage $cm
120124
121125
set rev $myrev($revnr)
@@ -164,10 +168,12 @@
164168
# were added to the file.
165169
166170
lappend myrevisions $rev
167171
return
168172
}
173
+
174
+ method done {} {}
169175
170176
# # ## ### ##### ######## #############
171177
## State
172178
173179
variable mypath {} ; # Path of rcs archive
174180
--- tools/cvs2fossil/lib/c2f_file.tcl
+++ tools/cvs2fossil/lib/c2f_file.tcl
@@ -46,10 +46,11 @@
46 #method setprincipalbranch {b} {puts pb=$b}
47 #method deftag {s r} {puts $s=$r}
48 #method setcomment {c} {puts comment=$c}
49 #method admindone {} {puts admindone}
50 #method def {rev date author state next branches} {puts "def $rev $date $author $state $next $branches"}
 
51 #method setdesc {d} {puts desc=$d}
52 #method extend {rev commitmsg deltarange} {puts "extend $commitmsg $deltarange"}
53 #method done {} {puts done}
54
55 # # ## ### ##### ######## #############
@@ -59,16 +60,11 @@
59 }
60
61 # # ## ### ##### ######## #############
62 ## Implement the sink
63
64 method begin {} {}
65 method done {} {}
66
67 method admindone {} {
68 # We do nothing at the boundary of admin and revision data
69 }
70
71 method sethead {revnr} {
72 set myhead $revnr
73 return
74 }
@@ -95,11 +91,14 @@
95 }
96 return
97 }
98
99 method setcomment {c} {# ignore}
100 method setdesc {d} {# ignore}
 
 
 
101
102 method def {revnr date author state next branches} {
103 $self LookForUnlabeledBranches $branches
104 $myproject author $author
105
@@ -112,10 +111,15 @@
112
113 RecordBasicDependencies $revnr $next
114 return
115 }
116
 
 
 
 
 
117 method extend {revnr commitmsg deltarange} {
118 set cm [string trim $commitmsg]
119 $myproject cmessage $cm
120
121 set rev $myrev($revnr)
@@ -164,10 +168,12 @@
164 # were added to the file.
165
166 lappend myrevisions $rev
167 return
168 }
 
 
169
170 # # ## ### ##### ######## #############
171 ## State
172
173 variable mypath {} ; # Path of rcs archive
174
--- tools/cvs2fossil/lib/c2f_file.tcl
+++ tools/cvs2fossil/lib/c2f_file.tcl
@@ -46,10 +46,11 @@
46 #method setprincipalbranch {b} {puts pb=$b}
47 #method deftag {s r} {puts $s=$r}
48 #method setcomment {c} {puts comment=$c}
49 #method admindone {} {puts admindone}
50 #method def {rev date author state next branches} {puts "def $rev $date $author $state $next $branches"}
51 #method defdone {} {puts def-done}
52 #method setdesc {d} {puts desc=$d}
53 #method extend {rev commitmsg deltarange} {puts "extend $commitmsg $deltarange"}
54 #method done {} {puts done}
55
56 # # ## ### ##### ######## #############
@@ -59,16 +60,11 @@
60 }
61
62 # # ## ### ##### ######## #############
63 ## Implement the sink
64
65 method begin {} {#ignore}
 
 
 
 
 
66
67 method sethead {revnr} {
68 set myhead $revnr
69 return
70 }
@@ -95,11 +91,14 @@
91 }
92 return
93 }
94
95 method setcomment {c} {# ignore}
96
97 method admindone {} {
98 # We do nothing at the boundary of admin and revision data
99 }
100
101 method def {revnr date author state next branches} {
102 $self LookForUnlabeledBranches $branches
103 $myproject author $author
104
@@ -112,10 +111,15 @@
111
112 RecordBasicDependencies $revnr $next
113 return
114 }
115
116 method defdone {} {
117 }
118
119 method setdesc {d} {# ignore}
120
121 method extend {revnr commitmsg deltarange} {
122 set cm [string trim $commitmsg]
123 $myproject cmessage $cm
124
125 set rev $myrev($revnr)
@@ -164,10 +168,12 @@
168 # were added to the file.
169
170 lappend myrevisions $rev
171 return
172 }
173
174 method done {} {}
175
176 # # ## ### ##### ######## #############
177 ## State
178
179 variable mypath {} ; # Path of rcs archive
180
--- tools/cvs2fossil/lib/rcsparser.tcl
+++ tools/cvs2fossil/lib/rcsparser.tcl
@@ -127,10 +127,11 @@
127127
State -> s
128128
Branches -> b
129129
NextRev -> n
130130
Call def $rev $d $a $s $n $b
131131
}
132
+ Call defdone
132133
return
133134
}
134135
135136
# # ## ### ##### ######## #############
136137
137138
--- tools/cvs2fossil/lib/rcsparser.tcl
+++ tools/cvs2fossil/lib/rcsparser.tcl
@@ -127,10 +127,11 @@
127 State -> s
128 Branches -> b
129 NextRev -> n
130 Call def $rev $d $a $s $n $b
131 }
 
132 return
133 }
134
135 # # ## ### ##### ######## #############
136
137
--- tools/cvs2fossil/lib/rcsparser.tcl
+++ tools/cvs2fossil/lib/rcsparser.tcl
@@ -127,10 +127,11 @@
127 State -> s
128 Branches -> b
129 NextRev -> n
130 Call def $rev $d $a $s $n $b
131 }
132 Call defdone
133 return
134 }
135
136 # # ## ### ##### ######## #############
137
138

Keyboard Shortcuts

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