Fossil

Check-in [6d5de5f1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6d5de5f1c19ddfad21a4d3e29cb123e69dc19f2f
User & Date: aku 2008-02-13 04:57:43
Context
2008-02-14
04:26
Tune log output tracking the creation workspace objects, make them less stilted. check-in: 300f3126 user: aku tags: trunk
2008-02-13
14:44
Merge with aku's branch. check-in: be2f99e6 user: drh tags: trunk
04:57
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. check-in: 6d5de5f1 user: aku tags: trunk
2008-02-12
06:23
Extended my notes. check-in: de03c8b1 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to cvs2fossil.txt.

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
	for one CVS repository. I.e. I can, for example, import all of
	tcllib, or a single subproject of tcllib, like tklib, but not
	multiple sub-projects in one go.

*	We have to look into the pass 'InitCsets' and hunt for the
	cause of the large amount of memory it is gobbling up.

*	Multi vendor branch on different symbol - Remember the first
	vendor branch so that we can force others on it.
	ristate -> Allow definition of workspace aliases (:vendor:)

*	Look at the dependencies on external packages and consider
	which of them can be moved into the importer, either as a
	simple utility command, or wholesale.

	struct::list
		assign, map, reverse, filter








<
<
<
<







6
7
8
9
10
11
12




13
14
15
16
17
18
19
	for one CVS repository. I.e. I can, for example, import all of
	tcllib, or a single subproject of tcllib, like tklib, but not
	multiple sub-projects in one go.

*	We have to look into the pass 'InitCsets' and hunt for the
	cause of the large amount of memory it is gobbling up.





*	Look at the dependencies on external packages and consider
	which of them can be moved into the importer, either as a
	simple utility command, or wholesale.

	struct::list
		assign, map, reverse, filter

Changes to tools/cvs2fossil/lib/c2f_prev.tcl.

495
496
497
498
499
500
501
502
503
504
505






506
507
508
509
510
511











512
513
514
515
516
517
518
	# If the LOD is however not yet known, then the current
	# changeset can be either of
	# (a) root of a vendor branch,
	# (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.












	    return [$rstate new $lodname]
	}

	# Case (c). We find the parent LOD of our LOD and let the new
	# workspace inherit from the parent's workspace.

	set plodname [[[$project getsymbol $lodname] parent] name]







<
|
|

>
>
>
>
>
>
|
|
|
|
|

>
>
>
>
>
>
>
>
>
>
>







495
496
497
498
499
500
501

502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
	# If the LOD is however not yet known, then the current
	# changeset can be either of
	# (a) root of a vendor branch,
	# (b) root of the trunk LOD, or
	# (c) the first changeset in a new LOD which was spawned from
	#     an existing LOD.


	# 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
	# workspace inherit from the parent's workspace.

	set plodname [[[$project getsymbol $lodname] parent] name]

Changes to tools/cvs2fossil/lib/c2f_ristate.tcl.

66
67
68
69
70
71
72






73
74
75
76
77
78
79
	return $wss
    }

    method get {lod} { return $mystate($lod) }
    method has {lod} { return [info exists mystate($lod)] }

    method names {} { return [array names mystate] }







    # # ## ### ##### ######## #############
    ## State

    variable mystate -array {} ; # Map from lines of development
				 # (identified by name) to their
				 # workspace state.







>
>
>
>
>
>







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
	return $wss
    }

    method get {lod} { return $mystate($lod) }
    method has {lod} { return [info exists mystate($lod)] }

    method names {} { return [array names mystate] }

    method dup {dst _from_ src} {
	log write 8 ristate {Duplicate workspace state for LOD "$dst" from "$src"}
	set mystate($dst) $mystate($src)
	return
    }

    # # ## ### ##### ######## #############
    ## State

    variable mystate -array {} ; # Map from lines of development
				 # (identified by name) to their
				 # workspace state.