Fossil

Check-in [bcc630d3]
Login

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

Overview
Comment:Tweaked log output of the topological sorter (revisions) to be tabular (aligned columns), added information (time ranges).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bcc630d3f5a352d5ed58520044cab357a8d32630
User & Date: aku 2007-11-25 07:41:07
Context
2007-11-25
07:44
Another helper, textual, write changeset data to stdout. check-in: 1ea319fb user: aku tags: trunk
07:41
Tweaked log output of the topological sorter (revisions) to be tabular (aligned columns), added information (time ranges). check-in: bcc630d3 user: aku tags: trunk
07:39
Changesets: Added accessor for to retrieve number of changesets known, and dropped the "trunk root -> NTDB root" dependency, is problematic. check-in: 96167b2a user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

70
71
72
73
74
75
76
77





78

79
80
81
82
83
84
85
86
87
..
97
98
99
100
101
102
103



104
105
106

107
108
109
110
111
112
113







114
115
116
117
118
119
120
	project::rev loadcounter
	return
    }

    typemethod run {} {
	# Pass manager interface. Executed to perform the
	# functionality of the pass.






	cyclebreaker savecmd  [myproc SaveOrder]

	state transaction {
	    cyclebreaker run break-rev [myproc Changesets]
	}
	return
    }

    typemethod discard {} {
	# Pass manager interface. Executed for all passes after the
	# run passes, to remove all data of this pass from the state,
................................................................................
    proc Changesets {} {
	return [struct::list filter [project::rev all] [myproc IsByRevision]]
    }

    proc IsByRevision {cset} { $cset byrevision }

    proc SaveOrder {graph at cset} {



	set cid [$cset id]

	log write 4 rtopsort "Changeset @ $at: [$cset str] <<[$graph node set $cset timerange]>>"

	state run {
	    INSERT INTO csorder (cid,  pos)
	    VALUES              ($cid, $at)
	}
	return
    }








    # # ## ### ##### ######## #############
    ## Configuration

    pragma -hasinstances   no ; # singleton
    pragma -hastypeinfo    no ; # no introspection
    pragma -hastypedestroy no ; # immortal









>
>
>
>
>

>

|







 







>
>
>


<
>







>
>
>
>
>
>
>







70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
...
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
136
	project::rev loadcounter
	return
    }

    typemethod run {} {
	# Pass manager interface. Executed to perform the
	# functionality of the pass.

	set len [string length [project::rev num]]
	set myatfmt %${len}s
	incr len 6
	set mycsfmt %${len}s

	cyclebreaker savecmd  [myproc SaveOrder]

	state transaction {
	    cyclebreaker run tsort-rev [myproc Changesets]
	}
	return
    }

    typemethod discard {} {
	# Pass manager interface. Executed for all passes after the
	# run passes, to remove all data of this pass from the state,
................................................................................
    proc Changesets {} {
	return [struct::list filter [project::rev all] [myproc IsByRevision]]
    }

    proc IsByRevision {cset} { $cset byrevision }

    proc SaveOrder {graph at cset} {
	::variable myatfmt
	::variable mycsfmt

	set cid [$cset id]


	log write 4 rtopsort "Changeset @ [format $myatfmt $at]: [format $mycsfmt [$cset str]] <<[FormatTR $graph $cset]>>"
	state run {
	    INSERT INTO csorder (cid,  pos)
	    VALUES              ($cid, $at)
	}
	return
    }

    proc FormatTR {graph cset} {
	return [join [struct::list map [$graph node set $cset timerange] {clock format}] { -- }]
    }

    typevariable myatfmt ; # Format for log output to gain better alignment of the various columns.
    typevariable mycsfmt ; # Ditto for the changesets.

    # # ## ### ##### ######## #############
    ## Configuration

    pragma -hasinstances   no ; # singleton
    pragma -hastypeinfo    no ; # no introspection
    pragma -hastypedestroy no ; # immortal