Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_file.tcl part of check-in [e100314ec2] - Extended file handling with main logic to import an archive into fossil. Main parts are determining the various orders for expansion and import, and expanding all revisions in an archive into full texts, iteratively applying the stored deltas. by aku on 2007-12-05 07:55:59. [view]

To:

File tools/cvs2fossil/lib/c2f_file.tcl part of check-in [bf0b70d5e0] - Fixed handling of empty revisions. by aku on 2007-12-06 03:48:25. [view]

@@ -383,10 +383,14 @@
 	set revnr           [$graph node get $node revnr]
 	set fname          r$revnr
 	struct::list assign [$graph node get $node text] offset length
 
-	seek $chan $offset start
-	set data [string map {@@ @} [read $chan $length]]
+	if {$length < 0} {
+	    set data ""
+	} else {
+	    seek $chan $offset start
+	    set data [string map {@@ @} [read $chan $length]]
+	}
 
 	if {![$graph node keyexists $node __base__]} {
 	    # Full text node. Get the data, decode it, and save.