Fossil SCM

Added debug helper methods. Fixed description of symbol reference in instances.

aku 2008-01-27 20:43 trunk
Commit 970be48fce64bb2aeca497ef96d8d8989bf0d936
--- tools/cvs2fossil/lib/c2f_frev.tcl
+++ tools/cvs2fossil/lib/c2f_frev.tcl
@@ -40,11 +40,12 @@
4040
method defid {} {
4141
set myid [incr myidcounter]
4242
return
4343
}
4444
45
- method id {} { return $myid }
45
+ method id {} { return $myid }
46
+ method file {} { return $myfile }
4647
4748
# Basic pieces ________________________
4849
4950
method hasmeta {} { return [expr {$mymetaid ne ""}] }
5051
method hastext {} {
@@ -398,10 +399,26 @@
398399
# myoperation - revision.op
399400
# myisondefaultbranch - revision.isdefault
400401
# mydbparent - revision.dbparent
401402
# mydbchild - revision.dbchild
402403
404
+ method DUMP {label} {
405
+ puts "$label = $self <$myrevnr> (NTDB=$myisondefaultbranch) \{"
406
+ puts "\tP\t$myparent"
407
+ puts "\tC\t$mychild"
408
+ puts "\tPB\t$myparentbranch"
409
+ puts "\tdbP\t$mydbparent"
410
+ puts "\tdbC\t$mydbchild"
411
+ foreach b $mybranches {
412
+ puts \t\tB\t$b
413
+ }
414
+ foreach b $mybranchchildren {
415
+ puts \t\tBC\t$b
416
+ }
417
+ puts "\}"
418
+ return
419
+ }
403420
404421
typevariable mybranchpattern {^((?:\d+\.\d+\.)+)(?:0\.)?(\d+)$}
405422
# First a nonzero even number of digit groups with trailing dot
406423
# CVS then sticks an extra 0 in here; RCS does not.
407424
# And the last digit group.
@@ -426,12 +443,12 @@
426443
# used.
427444
variable mylod {} ; # Reference to the line-of-development
428445
# object the revision belongs to. An
429446
# alternative idiom would be to call it
430447
# the branch the revision is on. This
431
- # reference is to a project-level object
432
- # (symbol or trunk).
448
+ # reference is to either project-level
449
+ # trunk or file-level symbol.
433450
434451
# Basic parent/child linkage (lines of development)
435452
436453
variable myparent {} ; # Ref to parent revision object. Link required because of
437454
# ; # 'cvsadmin -o', which can create arbitrary gaps in the
438455
--- tools/cvs2fossil/lib/c2f_frev.tcl
+++ tools/cvs2fossil/lib/c2f_frev.tcl
@@ -40,11 +40,12 @@
40 method defid {} {
41 set myid [incr myidcounter]
42 return
43 }
44
45 method id {} { return $myid }
 
46
47 # Basic pieces ________________________
48
49 method hasmeta {} { return [expr {$mymetaid ne ""}] }
50 method hastext {} {
@@ -398,10 +399,26 @@
398 # myoperation - revision.op
399 # myisondefaultbranch - revision.isdefault
400 # mydbparent - revision.dbparent
401 # mydbchild - revision.dbchild
402
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
404 typevariable mybranchpattern {^((?:\d+\.\d+\.)+)(?:0\.)?(\d+)$}
405 # First a nonzero even number of digit groups with trailing dot
406 # CVS then sticks an extra 0 in here; RCS does not.
407 # And the last digit group.
@@ -426,12 +443,12 @@
426 # used.
427 variable mylod {} ; # Reference to the line-of-development
428 # object the revision belongs to. An
429 # alternative idiom would be to call it
430 # the branch the revision is on. This
431 # reference is to a project-level object
432 # (symbol or trunk).
433
434 # Basic parent/child linkage (lines of development)
435
436 variable myparent {} ; # Ref to parent revision object. Link required because of
437 # ; # 'cvsadmin -o', which can create arbitrary gaps in the
438
--- tools/cvs2fossil/lib/c2f_frev.tcl
+++ tools/cvs2fossil/lib/c2f_frev.tcl
@@ -40,11 +40,12 @@
40 method defid {} {
41 set myid [incr myidcounter]
42 return
43 }
44
45 method id {} { return $myid }
46 method file {} { return $myfile }
47
48 # Basic pieces ________________________
49
50 method hasmeta {} { return [expr {$mymetaid ne ""}] }
51 method hastext {} {
@@ -398,10 +399,26 @@
399 # myoperation - revision.op
400 # myisondefaultbranch - revision.isdefault
401 # mydbparent - revision.dbparent
402 # mydbchild - revision.dbchild
403
404 method DUMP {label} {
405 puts "$label = $self <$myrevnr> (NTDB=$myisondefaultbranch) \{"
406 puts "\tP\t$myparent"
407 puts "\tC\t$mychild"
408 puts "\tPB\t$myparentbranch"
409 puts "\tdbP\t$mydbparent"
410 puts "\tdbC\t$mydbchild"
411 foreach b $mybranches {
412 puts \t\tB\t$b
413 }
414 foreach b $mybranchchildren {
415 puts \t\tBC\t$b
416 }
417 puts "\}"
418 return
419 }
420
421 typevariable mybranchpattern {^((?:\d+\.\d+\.)+)(?:0\.)?(\d+)$}
422 # First a nonzero even number of digit groups with trailing dot
423 # CVS then sticks an extra 0 in here; RCS does not.
424 # And the last digit group.
@@ -426,12 +443,12 @@
443 # used.
444 variable mylod {} ; # Reference to the line-of-development
445 # object the revision belongs to. An
446 # alternative idiom would be to call it
447 # the branch the revision is on. This
448 # reference is to either project-level
449 # trunk or file-level symbol.
450
451 # Basic parent/child linkage (lines of development)
452
453 variable myparent {} ; # Ref to parent revision object. Link required because of
454 # ; # 'cvsadmin -o', which can create arbitrary gaps in the
455

Keyboard Shortcuts

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