Diff
Not logged in

Differences From:

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]

To:

File tools/cvs2fossil/lib/c2f_file.tcl part of check-in [08f8085700] - Added progress feedback to the file import, and moved the log output to level 8. by aku on 2007-12-06 03:54:15. [view]

@@ -345,12 +345,15 @@
 
 	# First traverse the expansion graph, this gives us the
 	# revisions in the order we have to expand them, which we do.
 
+	set max [llength [$ex nodes]]
+	set myimport 0
+
 	gtcore datacmd   [mymethod ExpandData]
 	gtcore formatcmd [mymethod ExpandFormat]
 	gtcore sortcmd   [mymethod ExpandSort]
-	gtcore savecmd   [mymethod Expand1 $ac $dir]
+	gtcore savecmd   [mymethod Expand1 $ac $dir $max]
 
 	gtcore traverse $ex ; # The graph is gone after the call
 	close $ac
 
@@ -378,9 +381,11 @@
 	# candidates = list(item), item = list(node revnr)
 	# Sort by node and revnr -> Trunk revisions come first.
 	return [lsort -index 1 -dict [lsort -index 0 -dict $candidates]]
     }
-    method Expand1 {chan dir graph node} {
+    method Expand1 {chan dir max graph node} {
+	log progress 3 file $myimport $max ; incr myimport
+
 	set revnr           [$graph node get $node revnr]
 	set fname          r$revnr
 	struct::list assign [$graph node get $node text] offset length
 
@@ -393,9 +398,9 @@
 
 	if {![$graph node keyexists $node __base__]} {
 	    # Full text node. Get the data, decode it, and save.
 
-	    log write 2 file {Expanding <$revnr>, full text}
+	    log write 8 file {Expanding <$revnr>, full text}
 
 	    fileutil::writeFile -translation binary $dir/$fname $data
 	} else {
 	    # Delta node. __base__ is the name of the file containing
@@ -402,9 +407,9 @@
 	    # the baseline. The patch is at the specified location of
 	    # the archive file.
 
 	    set fbase [$graph node get $node __base__]
-	    log write 2 file {Expanding <$revnr>, is delta of <$fbase>}
+	    log write 8 file {Expanding <$revnr>, is delta of <$fbase>}
 
 	    set base [fileutil::cat -translation binary $dir/$fbase]
 
 	    # Writing the patch to disk is just for better