Check-in [a1bbf19d51]
Not logged in
Overview

SHA1 Hash:a1bbf19d511ca86c5da1ad2cb5b32d4e45d2f308
Date: 2008-02-05 06:09:27
User: aku
Comment:Accept a last trunk-changeset on a vendor branch with the :trunk: already defined, and warn. Force changeset to be vendor-only, out of trunk.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified tools/cvs2fossil/lib/c2f_prev.tcl from [c36a0d49d0] to [f526a431ee].

@@ -428,14 +428,23 @@
 		      [$lws getid] [$lws get]]
 
 	# Remember the imported changeset in the state, under our
 	# LOD. And if it is the last trunk changeset on the vendor
 	# branch then the revision is also the actual root of the
-	# :trunk:, so we remember it as such in the state.
+	# :trunk:, so we remember it as such in the state. However if
+	# the trunk already exists then the changeset cannot be on it
+	# any more. This indicates weirdness in the setup of the
+	# vendor branch, but one we can work around.
 
 	$lws defid $uuid
-	if {$lastdefaultontrunk} { $rstate new :trunk: [$lws name] }
+	if {$lastdefaultontrunk} {
+	    if {[$rstate has :trunk:]} {
+		log write 2 csets {Multiple changesets declared to be the last trunk changeset on the vendor-branch}
+	    } else {
+		$rstate new :trunk: [$lws name]
+	    }
+	}
 
 	# Remember the whole changeset / uuid mapping, for the tags.
 
 	state run {
 	    INSERT INTO csuuid (cid,   uuid)