Check-in [f9e0d23d97]
Not logged in
Overview

SHA1 Hash:f9e0d23d97e9bce240ff9ea8b9373304ef63bc6e
Date: 2008-01-30 08:25:00
User: aku
Comment:Added placeholder code to the fossil accessor class for the import of a revision. currently only logging the call.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified tools/cvs2fossil/lib/c2f_fossil.tcl from [6b47975f7e] to [fe0ae1211b].

@@ -91,10 +91,35 @@
 	}
 	$self RestorePwd
 
 	log write 3 fossil Done.
 	return [array get id]
+    }
+
+    method importrevision {label user message date parent revisions} {
+	# TODO = Write the actual import, and up the log level.
+
+	log write 2 fossil {== $user @ [clock format $date]}
+	log write 2 fossil {-> $parent}
+	log write 2 fossil {%% [join [split $message \n] "\n%% "]}
+
+	set uuids {}
+	foreach {uuid fname revnr} $revisions {
+	    lappend uuids $uuid
+	    log write 2 fossil {** $fname/$revnr = <$uuid>}
+	}
+
+	# Massage the commit message to remember the old user name
+	# which did the commit in CVS.
+
+	set message "By $user:\n$message"
+
+	# run fossil test-command performing the import.
+	#
+
+	log write 2 fossil {== $label}
+	return $label ; # FAKE a uuid for the moment
     }
 
     method finalize {destination} {
 	::file rename -force $myrepository $destination
 	::file delete -force $myworkspace