Fossil

Check-in [39e19c0c]
Login

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

Overview
Comment:Simplified some code dealing with the item -> changeset map, using the changed semantics (1:n -> 1:1).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:39e19c0cf304c7ba7dd2e5a65ba8b8e1cc3e7792
User & Date: aku 2007-11-29 07:41:48
Context
2007-11-29
07:47
More realignment of variable names with their content, in pass 5. check-in: 27f093d2 user: aku tags: trunk
07:41
Simplified some code dealing with the item -> changeset map, using the changed semantics (1:n -> 1:1). check-in: 39e19c0c user: aku tags: trunk
07:36
Brought the variable names into alignment with the semantics, now again naming what is stored in them. check-in: deab4d03 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

    # result = dict (item -> list (changeset))
    method successormap {} {
	# NOTE / FUTURE: Possible bottleneck.
	array set tmp {}
	foreach {rev children} [$self nextmap] {
	    foreach child $children {
		# 8.5 lappend tmp($rev) {*}$myitemmap($child)
		foreach cset $myitemmap($child) {
		    lappend tmp($rev) $cset
		}
	    }
	    set tmp($rev) [lsort -unique $tmp($rev)]
	}
	return [array get tmp]
    }

    # result = list (changeset)
    method successors {} {
	# NOTE / FUTURE: Possible bottleneck.
	set csets {}
	foreach {_ children} [$self nextmap] {
	    foreach child $children {
		# 8.5 lappend csets {*}$myitemmap($child)
		foreach cset $myitemmap($child) {
		    lappend csets $cset
		}
	    }
	}
	return [lsort -unique $csets]
    }

    # result = dict (item -> list (changeset))
    method predecessormap {} {
	# NOTE / FUTURE: Possible bottleneck.
	array set tmp {}
	foreach {rev children} [$self premap] {
	    foreach child $children {
		# 8.5 lappend tmp($rev) {*}$myitemmap($child)
		foreach cset $myitemmap($child) {
		    lappend tmp($rev) $cset
		}
	    }
	    set tmp($rev) [lsort -unique $tmp($rev)]
	}
	return [array get tmp]
    }

    # item -> list (item)







<
<
|
<












<
<
|
<











<
<
|
<







87
88
89
90
91
92
93


94

95
96
97
98
99
100
101
102
103
104
105
106


107

108
109
110
111
112
113
114
115
116
117
118


119

120
121
122
123
124
125
126

    # result = dict (item -> list (changeset))
    method successormap {} {
	# NOTE / FUTURE: Possible bottleneck.
	array set tmp {}
	foreach {rev children} [$self nextmap] {
	    foreach child $children {


		lappend tmp($rev) $myitemmap($child)

	    }
	    set tmp($rev) [lsort -unique $tmp($rev)]
	}
	return [array get tmp]
    }

    # result = list (changeset)
    method successors {} {
	# NOTE / FUTURE: Possible bottleneck.
	set csets {}
	foreach {_ children} [$self nextmap] {
	    foreach child $children {


		lappend csets $myitemmap($child)

	    }
	}
	return [lsort -unique $csets]
    }

    # result = dict (item -> list (changeset))
    method predecessormap {} {
	# NOTE / FUTURE: Possible bottleneck.
	array set tmp {}
	foreach {rev children} [$self premap] {
	    foreach child $children {


		lappend tmp($rev) $myitemmap($child)

	    }
	    set tmp($rev) [lsort -unique $tmp($rev)]
	}
	return [array get tmp]
    }

    # item -> list (item)