Fossil SCM
Added debug helper methods. Fixed description of symbol reference in instances.
Commit
970be48fce64bb2aeca497ef96d8d8989bf0d936
Parent
d3aa33884b6ce40…
1 file changed
+20
-3
+20
-3
| --- tools/cvs2fossil/lib/c2f_frev.tcl | ||
| +++ tools/cvs2fossil/lib/c2f_frev.tcl | ||
| @@ -40,11 +40,12 @@ | ||
| 40 | 40 | method defid {} { |
| 41 | 41 | set myid [incr myidcounter] |
| 42 | 42 | return |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - method id {} { return $myid } | |
| 45 | + method id {} { return $myid } | |
| 46 | + method file {} { return $myfile } | |
| 46 | 47 | |
| 47 | 48 | # Basic pieces ________________________ |
| 48 | 49 | |
| 49 | 50 | method hasmeta {} { return [expr {$mymetaid ne ""}] } |
| 50 | 51 | method hastext {} { |
| @@ -398,10 +399,26 @@ | ||
| 398 | 399 | # myoperation - revision.op |
| 399 | 400 | # myisondefaultbranch - revision.isdefault |
| 400 | 401 | # mydbparent - revision.dbparent |
| 401 | 402 | # mydbchild - revision.dbchild |
| 402 | 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 | + } | |
| 403 | 420 | |
| 404 | 421 | typevariable mybranchpattern {^((?:\d+\.\d+\.)+)(?:0\.)?(\d+)$} |
| 405 | 422 | # First a nonzero even number of digit groups with trailing dot |
| 406 | 423 | # CVS then sticks an extra 0 in here; RCS does not. |
| 407 | 424 | # And the last digit group. |
| @@ -426,12 +443,12 @@ | ||
| 426 | 443 | # used. |
| 427 | 444 | variable mylod {} ; # Reference to the line-of-development |
| 428 | 445 | # object the revision belongs to. An |
| 429 | 446 | # alternative idiom would be to call it |
| 430 | 447 | # 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. | |
| 433 | 450 | |
| 434 | 451 | # Basic parent/child linkage (lines of development) |
| 435 | 452 | |
| 436 | 453 | variable myparent {} ; # Ref to parent revision object. Link required because of |
| 437 | 454 | # ; # 'cvsadmin -o', which can create arbitrary gaps in the |
| 438 | 455 |
| --- 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 |