Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_frev.tcl part of check-in [47d52d1efd] - Added convenience method for assertions and used it in place of the existing if/trouble internal constructions. Changed API of 'log write' so that we can defer substituation of the message to when the write actually happen, and converted all places which would be hit by double-substitution. The remaining 'log write' calls will be converted incrementally. by aku on 2007-11-28 05:39:49. [view]

To:

File tools/cvs2fossil/lib/c2f_frev.tcl part of check-in [970be48fce] - Added debug helper methods. Fixed description of symbol reference in instances. by aku on 2008-01-27 20:43:19. [view]

@@ -41,9 +41,10 @@
 	set myid [incr myidcounter]
 	return
     }
 
-    method id {} { return $myid }
+    method id   {} { return $myid }
+    method file {} { return $myfile }
 
     # Basic pieces ________________________
 
     method hasmeta {} { return [expr {$mymetaid ne ""}] }
@@ -399,8 +400,24 @@
     #             myisondefaultbranch - revision.isdefault
     #             mydbparent          - revision.dbparent
     #             mydbchild           - revision.dbchild
 
+    method DUMP {label} {
+	puts "$label = $self <$myrevnr> (NTDB=$myisondefaultbranch) \{"
+	puts "\tP\t$myparent"
+	puts "\tC\t$mychild"
+	puts "\tPB\t$myparentbranch"
+	puts "\tdbP\t$mydbparent"
+	puts "\tdbC\t$mydbchild"
+	foreach b $mybranches {
+	    puts \t\tB\t$b
+	}
+	foreach b $mybranchchildren {
+	    puts \t\tBC\t$b
+	}
+	puts "\}"
+	return
+    }
 
     typevariable mybranchpattern {^((?:\d+\.\d+\.)+)(?:0\.)?(\d+)$}
     # First a nonzero even number of digit groups with trailing dot
     # CVS then sticks an extra 0 in here; RCS does not.
@@ -427,10 +444,10 @@
     variable mylod       {} ; # Reference to the line-of-development
 			      # object the revision belongs to. An
 			      # alternative idiom would be to call it
 			      # the branch the revision is on. This
-			      # reference is to a project-level object
-			      # (symbol or trunk).
+			      # reference is to either project-level
+			      # trunk or file-level symbol.
 
     # Basic parent/child linkage (lines of development)
 
     variable myparent {} ; # Ref to parent revision object. Link required because of