Fossil

Check-in [d3aa3388]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Allow for detached branches when checking lod consistency. Fixed formatting nit. Added debug helper method.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d3aa33884b6ce408dc8ad45fa2a28a43fbc788ac
User & Date: aku 2008-01-27 20:42:01
Context
2008-01-27
20:43
Added debug helper methods. Fixed description of symbol reference in instances. check-in: 970be48f user: aku tags: trunk
20:42
Allow for detached branches when checking lod consistency. Fixed formatting nit. Added debug helper method. check-in: d3aa3388 user: aku tags: trunk
20:40
Fixed bug in the code detaching a vendor branch. Left link to removed parent dangling, and killed connection to first on branch. No more. check-in: 0adaabf1 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tools/cvs2fossil/lib/c2f_fsym.tcl.

138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
...
156
157
158
159
160
161
162





163

164
165
166
167
168
169
170
...
202
203
204
205
206
207
208
















209
210
211
212
213
214
215
    method parent      {} { return $mybranchparent }
    method child       {} { return $mybranchchild }
    method position    {} { return $mybranchposition }

    # Tag acessor methods.

    method tagrevnr  {}    { return $mynr }
    method settagrev {rev} {set mytagrev $rev ; return }

    # Derived information

    method lod {} { return $mylod }

    method setlod {lod} {
	set mylod $lod
................................................................................

    method checklod {} {
	# Consistency check. The symbol's line-of-development has to
	# be same as the line-of-development of its source (parent
	# revision of a branch, revision of a tag itself).

	switch -exact -- $mytype {





	    branch  { set slod [$mybranchparent lod] }

	    tag     { set slod [$mytagrev       lod] }
	}

	if {$mylod ne $slod} {
	    trouble fatal "For $mytype [$mysymbol name]: LOD conflict with source, '[$mylod name]' vs. '[$slod name]'"
	    return
	}
................................................................................
		    state run [string map $map $cmd]
		}
	    }
	}

	return
    }

















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

    # Persistent:
    #        Tag: myid           - tag.tid
    #             myfile         - tag.fid







|







 







>
>
>
>
>
|
>







 







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







138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
...
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
...
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
    method parent      {} { return $mybranchparent }
    method child       {} { return $mybranchchild }
    method position    {} { return $mybranchposition }

    # Tag acessor methods.

    method tagrevnr  {}    { return $mynr }
    method settagrev {rev} { set mytagrev $rev ; return }

    # Derived information

    method lod {} { return $mylod }

    method setlod {lod} {
	set mylod $lod
................................................................................

    method checklod {} {
	# Consistency check. The symbol's line-of-development has to
	# be same as the line-of-development of its source (parent
	# revision of a branch, revision of a tag itself).

	switch -exact -- $mytype {
	    branch  {
		# However, ignore this if the branch symbol is
		# detached.
		if {$mybranchparent eq ""} return

		set slod [$mybranchparent lod]
	    }
	    tag     { set slod [$mytagrev       lod] }
	}

	if {$mylod ne $slod} {
	    trouble fatal "For $mytype [$mysymbol name]: LOD conflict with source, '[$mylod name]' vs. '[$slod name]'"
	    return
	}
................................................................................
		    state run [string map $map $cmd]
		}
	    }
	}

	return
    }

    method DUMP {label} {
	puts "$label = $self $mytype [$self name] \{"
	switch -exact -- $mytype {
	    tag {
		puts "\tR\t$mytagrev"
	    }
	    branch {
		puts "\tP\t$mybranchparent"
		puts "\tC\t$mybranchchild"
		puts "\t\t<$mynr>"
	    }
	}
	puts "\}"
	return
    }

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

    # Persistent:
    #        Tag: myid           - tag.tid
    #             myfile         - tag.fid