Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_prev.tcl part of check-in [21d9664fb5] - Properly initialize the array containing the changesets split by type. by aku on 2008-02-08 04:49:36. Also file tools/cvs2fossil/lib/c2f_prev.tcl part of check-in [6b78df3861] - Merge in changes from Andreas's branch. by drh on 2008-02-08 21:52:21. [view]

To:

File tools/cvs2fossil/lib/c2f_prev.tcl part of check-in [be2f99e6a4] - Merge with aku's branch. by drh on 2008-02-13 14:44:50. Also file tools/cvs2fossil/lib/c2f_prev.tcl part of check-in [6d5de5f1c1] - Tuned the handling of the vendor branch in case we have multiple different symbols representing it. The import pass now effectively merges these symbols into a single line of development. by aku on 2008-02-13 04:57:43. [view]

@@ -498,18 +498,34 @@
 	# (b) root of the trunk LOD, or
 	# (c) the first changeset in a new LOD which was spawned from
 	#     an existing LOD.
 
-	if {$isdefault || ($lodname eq ":trunk:")} {
-	    # For both (a) and (b) we have to create a new workspace
-	    # for the lod, and it doesn't inherit from anything.
-
-	    # Note that case (b) may never occur. See the variable
-	    # 'lastdefaultontrunk' in the caller (method pushto). This
-	    # flag can the generation of the workspace for the :trunk:
-	    # LOD as well, making it inherit the state of the last
-	    # trunk-changeset on the vendor-branch.
-
+	# For both (a) and (b) we have to create a new workspace for
+	# the lod, and it doesn't inherit from anything.
+
+	# One exception for (a). If we already have a :vendor: branch
+	# then multiple symbols were used for the vendor branch by
+	# different files. In that case the 'new' branch is made an
+	# alias of the :vendor:, effectively merging the symbols
+	# together.
+
+	# Note that case (b) may never occur. See the variable
+	# 'lastdefaultontrunk' in the caller (method pushto). This
+	# flag can the generation of the workspace for the :trunk: LOD
+	# as well, making it inherit the state of the last
+	# trunk-changeset on the vendor-branch.
+
+	if {$isdefault} {
+	    if {![$rstate has ":vendor:"]} {
+		# Create the vendor branch if not present already.
+		$rstate new :vendor:
+	    }
+	    # Merge the new symbol to the vendor branch
+	    $rstate dup $lodname <-- :vendor:
+	    return [$rstate get $lodname]
+	}
+
+	if {$lodname eq ":trunk:"} {
 	    return [$rstate new $lodname]
 	}
 
 	# Case (c). We find the parent LOD of our LOD and let the new