Fossil

Check-in [911d56a8]
Login

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

Overview
Comment:Changesets, extended human readable representation, and tweaking of log output.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 911d56a8c8b9bac7f22ba3baacf3125d00e53f4c
User & Date: aku 2007-11-27 09:03:07
Context
2007-11-27
09:04
Updated to extended changeset string, and added tabular formatting. Further tweaked output, putting timestamp adjust messages on the same line as the changeset itself. check-in: 1c39e576 user: aku tags: trunk
09:03
Changesets, extended human readable representation, and tweaking of log output. check-in: 911d56a8 user: aku tags: trunk
08:59
Bugfix in the generation of the initial symbol changesets. Keep entries apart per line-of-development. check-in: 2e07cd71 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

48
49
50
51
52
53
54
55















56
57
58
59
60
61
62
63
64
65
66
67

68
69
70
71
72
73
74
...
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
...
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
	# mapping from revisions to them.
	lappend mychangesets   $self
	set     myidmap($myid) $self
	foreach r $revisions { lappend myrevmap($r) $self }
	return
    }

    method str {} { return "<$mytype ${myid}>" }
















    method id        {} { return $myid }
    method revisions {} { return $myrevisions }
    method data      {} { return [list $myproject $mytype $mysrcid] }

    method bysymbol   {} { return [expr {$mytype eq "sym"}] }
    method byrevision {} { return [expr {$mytype eq "rev"}] }

    method setpos {p} { set mypos $p ; return }
    method pos    {}  { return $mypos }

    method isbranch {} {

	return [expr {($mytype eq "sym") &&
		      ($mybranchcode == [state one {
			  SELECT type FROM symbol WHERE sid = $mysrcid
		      }])}]
    }

    # result = dict (revision -> list (changeset))
................................................................................
	# Array of dependencies (parent -> child). This is pulled from
	# the state, and limited to successors within the changeset.

	array set dependencies {}
	PullInternalSuccessorRevisions dependencies $myrevisions
	if {![array size dependencies]} {return 0} ; # Nothing to break.

	log write 6 csets ...[$self str].......................................................

	# We have internal dependencies to break. We now iterate over
	# all positions in the list (which is chronological, at least
	# as far as the timestamps are correct and unique) and
	# determine the best position for the break, by trying to
	# break as many dependencies as possible in one go. When a
	# break was found this is redone for the fragments coming and
................................................................................

	    foreach loc $depc($dep) { incr cross($loc) -1 }
	    unset depc($dep)

	    if {!$six} continue

	    struct::list assign $dep parent child
	    log write 6 csets "Broke dependency [PD $parent] --> [PD $child]"
	}

	return
    }

    # Print identifying data for a revision (project, file, dotted rev
    # number), for high verbosity log output.







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












>







 







|







 







|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
...
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
...
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
	# mapping from revisions to them.
	lappend mychangesets   $self
	set     myidmap($myid) $self
	foreach r $revisions { lappend myrevmap($r) $self }
	return
    }

    method str {} {
	set str    "<"
	set detail ""
	if {$mytype eq "sym"} {
	    struct::list assign [state run {
		SELECT T.name, S.name
		FROM   symtype T, symbol S
		WHERE  S.sid = $mysrcid
		AND    T.tid = S.type
	    }] stype detail
	    append str $stype " "
	    set detail " '$detail'"
	}
	append str "$mytype ${myid}${detail}>"
	return $str
    }

    method id        {} { return $myid }
    method revisions {} { return $myrevisions }
    method data      {} { return [list $myproject $mytype $mysrcid] }

    method bysymbol   {} { return [expr {$mytype eq "sym"}] }
    method byrevision {} { return [expr {$mytype eq "rev"}] }

    method setpos {p} { set mypos $p ; return }
    method pos    {}  { return $mypos }

    method isbranch {} {
	error NOT-USED
	return [expr {($mytype eq "sym") &&
		      ($mybranchcode == [state one {
			  SELECT type FROM symbol WHERE sid = $mysrcid
		      }])}]
    }

    # result = dict (revision -> list (changeset))
................................................................................
	# Array of dependencies (parent -> child). This is pulled from
	# the state, and limited to successors within the changeset.

	array set dependencies {}
	PullInternalSuccessorRevisions dependencies $myrevisions
	if {![array size dependencies]} {return 0} ; # Nothing to break.

	log write 5 csets ...[$self str].......................................................

	# We have internal dependencies to break. We now iterate over
	# all positions in the list (which is chronological, at least
	# as far as the timestamps are correct and unique) and
	# determine the best position for the break, by trying to
	# break as many dependencies as possible in one go. When a
	# break was found this is redone for the fragments coming and
................................................................................

	    foreach loc $depc($dep) { incr cross($loc) -1 }
	    unset depc($dep)

	    if {!$six} continue

	    struct::list assign $dep parent child
	    log write 5 csets "Broke dependency [PD $parent] --> [PD $child]"
	}

	return
    }

    # Print identifying data for a revision (project, file, dotted rev
    # number), for high verbosity log output.