Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_fossil.tcl part of check-in [41c9b79928] - Activated invokation of the fossil command importing a revision. by aku on 2008-02-01 05:33:21. [view]

To:

File tools/cvs2fossil/lib/c2f_fossil.tcl part of check-in [9214c11831] - Changeset handling, extended logging of how parent is determined. Fossil access, fixed importrev call to use correct workspace/repository. Fixed handling of output, stripping unwanted text, checking of output syntax. Extended logging. Added final 'rebuild'. NOTE: formation of the changesets/manifests is buggy, is not tracking unchanged files across changesets. Further not yet tracking when files have been removed. by aku on 2008-02-02 07:03:39. [view]

@@ -37,8 +37,11 @@
 
 	Do new [::file nativename $myrepository]
 	$self InWorkspace ; Do open [::file nativename $myrepository]
 	$self RestorePwd
+
+	log write 8 fossil {scratch repository $myrepository}
+	log write 8 fossil {scratch workspace  $myworkspace}
 	return
     }
 
     # # ## ### ##### ######## #############
@@ -114,15 +117,29 @@
 	    log write 2 fossil {** <[format %5d $frid]> = <$flabel>}
 	}
 
 	# run fossil test-command performing the import.
-	set uuid [eval $cmd]
+	log write 8 fossil {	[lreplace $cmd 3 3 @@]}
+
+	$self InWorkspace
+	set res [eval $cmd]
+	$self RestorePwd
+
+	integrity assert {
+	    [regexp {^inserted as record \d+$} $res]
+	} {Unable to process unexpected fossil output '$res'}
+	set uuid [lindex $res 3]
 
 	log write 2 fossil {== $uuid}
+	log write 2 fossil { }
+	log write 2 fossil { }
+
 	return $uuid
     }
 
     method finalize {destination} {
+	Do rebuild [::file nativename $myrepository]
+
 	::file rename -force $myrepository $destination
 	::file delete -force $myworkspace
 	$self destroy
 	return