Fossil SCM

Investigation of changeset order differences between running passes 1 to 6 and pass 6 alone show why the topological sort passes are separate in cvs2svn. The breaking of cycles can change the order of things due to different timeranges and dependencies of the broken changesets. Created two new passes for the sorting. The break passes 7 and 8 are now passes 8 and 9, and the new sort passes are 7 and 10.

aku 2007-11-25 02:59 trunk
Commit 66c85b4db47d612813594021856271974b584157
--- a/tools/cvs2fossil/lib/c2f_patopsort.tcl
+++ b/tools/cvs2fossil/lib/c2f_patopsort.tcl
@@ -0,0 +1 @@
1
+#$at: [$cset str]"## break-allChangesets]
--- a/tools/cvs2fossil/lib/c2f_patopsort.tcl
+++ b/tools/cvs2fossil/lib/c2f_patopsort.tcl
@@ -0,0 +1 @@
 
--- a/tools/cvs2fossil/lib/c2f_patopsort.tcl
+++ b/tools/cvs2fossil/lib/c2f_patopsort.tcl
@@ -0,0 +1 @@
1 #$at: [$cset str]"## break-allChangesets]
--- a/tools/cvs2fossil/lib/c2f_prtopsort.tcl
+++ b/tools/cvs2fossil/lib/c2f_prtopsort.tcl
@@ -0,0 +1,57 @@
1
+## -*- tcl -*-
2
+# # ## ### ##### ######## ############# #####################
3
+## Copyright (c) 2007 Andreas Kupries.
4
+#
5
+# This software is licensed as described in the file LICENSE, which
6
+# you should have received as part of this distribution.
7
+#
8
+# This software consists of voluntary contributions made by many
9
+# individuals. For exact contribution history, see the revision
10
+# history and logs, available at http://fossil-scm.hwaci.com/fossil
11
+# # ## ### ##### ######## ############# #####################
12
+
13
+## Pass VII. Tany havingoes over the set of revision based changesets
14
+## and sorts them topologically. It assumes that there are no cycles
15
+## which could impede it, any having been broken by the previous pass,
16
+## and aborts if that condition doesn't hold.
17
+
18
+# # ## ### ##### ######## ############# #####################
19
+## Requirements
20
+
21
+package require Tcl 8.4 ackage require ;breakgher order list operations.
22
+package require vc::tools::log ; # User feedback.
23
+package require vc::fossil::import::cvs::cyclebreaker ; # Breaking dependency cycles.
24
+package require vc::fossil::import::cvs::state ; # State storage.
25
+package require vc::fossil::import::cvs::project::rev ; # Project level changesets
26
+
27
+# # ## ### #####return [struct::list filter [project::rev all] [myproc IsByRevision]]
28
+ }
29
+
30
+ proc IsByRevisioass with the management
31
+
32
+vc::fossil::import::cv
33
+ {Topologically Sort Rev$at: [$cset str] <<ames and structure of the pereadi## #####################
34
+##
35
+
36
+snit::type
37
+
38
+snit::type ::vc::fossil::import::cvs::pass::vc::fossil::import::
39
+
40
+ cid INTEGER NOT NULL REFERENCES changeset,
41
+ pos INTEGER NOT NULL,
42
+ UNIQUE (cid),
43
+ UNIQUE (pos)
44
+ }
45
+ return
46
+ }
47
+
48
+ typemethod load {} {
49
+ # Pass manager interface. Executed to load data computed by
50
+ # this pass into memory when this pass is reading# ##### ######## ############# #####################
51
+## Requirements
52
+
53
+package require Tcl 8.4 ; # Required runtime.
54
+package require snit ; # OO system.
55
+package require struct::list ; # Higher order list operations.
56
+package require vc::tools::log ; # User feedback.
57
+package require vc::fossil::import::cvs::cyclebreaker
--- a/tools/cvs2fossil/lib/c2f_prtopsort.tcl
+++ b/tools/cvs2fossil/lib/c2f_prtopsort.tcl
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/tools/cvs2fossil/lib/c2f_prtopsort.tcl
+++ b/tools/cvs2fossil/lib/c2f_prtopsort.tcl
@@ -0,0 +1,57 @@
1 ## -*- tcl -*-
2 # # ## ### ##### ######## ############# #####################
3 ## Copyright (c) 2007 Andreas Kupries.
4 #
5 # This software is licensed as described in the file LICENSE, which
6 # you should have received as part of this distribution.
7 #
8 # This software consists of voluntary contributions made by many
9 # individuals. For exact contribution history, see the revision
10 # history and logs, available at http://fossil-scm.hwaci.com/fossil
11 # # ## ### ##### ######## ############# #####################
12
13 ## Pass VII. Tany havingoes over the set of revision based changesets
14 ## and sorts them topologically. It assumes that there are no cycles
15 ## which could impede it, any having been broken by the previous pass,
16 ## and aborts if that condition doesn't hold.
17
18 # # ## ### ##### ######## ############# #####################
19 ## Requirements
20
21 package require Tcl 8.4 ackage require ;breakgher order list operations.
22 package require vc::tools::log ; # User feedback.
23 package require vc::fossil::import::cvs::cyclebreaker ; # Breaking dependency cycles.
24 package require vc::fossil::import::cvs::state ; # State storage.
25 package require vc::fossil::import::cvs::project::rev ; # Project level changesets
26
27 # # ## ### #####return [struct::list filter [project::rev all] [myproc IsByRevision]]
28 }
29
30 proc IsByRevisioass with the management
31
32 vc::fossil::import::cv
33 {Topologically Sort Rev$at: [$cset str] <<ames and structure of the pereadi## #####################
34 ##
35
36 snit::type
37
38 snit::type ::vc::fossil::import::cvs::pass::vc::fossil::import::
39
40 cid INTEGER NOT NULL REFERENCES changeset,
41 pos INTEGER NOT NULL,
42 UNIQUE (cid),
43 UNIQUE (pos)
44 }
45 return
46 }
47
48 typemethod load {} {
49 # Pass manager interface. Executed to load data computed by
50 # this pass into memory when this pass is reading# ##### ######## ############# #####################
51 ## Requirements
52
53 package require Tcl 8.4 ; # Required runtime.
54 package require snit ; # OO system.
55 package require struct::list ; # Higher order list operations.
56 package require vc::tools::log ; # User feedback.
57 package require vc::fossil::import::cvs::cyclebreaker
--- tools/cvs2fossil/lib/cvs2fossil.tcl
+++ tools/cvs2fossil/lib/cvs2fossil.tcl
@@ -34,17 +34,14 @@
3434
# of a relational database proper for the persistent state,
3535
# allowing us to sort the data on the fly as we need it.
3636
3737
package require vc::fossil::import::cvs::pass::initcsets ; # Init'ialize C'hange'Sets
3838
package require vc::fossil::import::cvs::pass::breakrcycle ; # Break' R'evision Cycle's
39
-
40
-# Note: cvs2svn's RevisionTopologicalSortPass is not a separate pass,
41
-# but was subsumed by the previous pass, by immediately saving
42
-# the order of consumed graph nodes to 'csorder'.
43
-
39
+package require vc::fossil::import::cvs::pass::rtopsort ; # R'evision Top'ological Sort'
4440
package require vc::fossil::import::cvs::pass::breakscycle ; # Break' S'ymbol Cycle's
4541
package require vc::fossil::import::cvs::pass::breakacycle ; # Break' A'll Cycle's
42
+package require vc::fossil::import::cvs::pass::atopsort ; # A'll Top'ological Sort'
4643
4744
# # ## ### ##### ######## ############# #####################
4845
## Support for passes etc.
4946
5047
package require vc::fossil::import::cvs::option ; # Cmd line parsing & database
5148
--- tools/cvs2fossil/lib/cvs2fossil.tcl
+++ tools/cvs2fossil/lib/cvs2fossil.tcl
@@ -34,17 +34,14 @@
34 # of a relational database proper for the persistent state,
35 # allowing us to sort the data on the fly as we need it.
36
37 package require vc::fossil::import::cvs::pass::initcsets ; # Init'ialize C'hange'Sets
38 package require vc::fossil::import::cvs::pass::breakrcycle ; # Break' R'evision Cycle's
39
40 # Note: cvs2svn's RevisionTopologicalSortPass is not a separate pass,
41 # but was subsumed by the previous pass, by immediately saving
42 # the order of consumed graph nodes to 'csorder'.
43
44 package require vc::fossil::import::cvs::pass::breakscycle ; # Break' S'ymbol Cycle's
45 package require vc::fossil::import::cvs::pass::breakacycle ; # Break' A'll Cycle's
 
46
47 # # ## ### ##### ######## ############# #####################
48 ## Support for passes etc.
49
50 package require vc::fossil::import::cvs::option ; # Cmd line parsing & database
51
--- tools/cvs2fossil/lib/cvs2fossil.tcl
+++ tools/cvs2fossil/lib/cvs2fossil.tcl
@@ -34,17 +34,14 @@
34 # of a relational database proper for the persistent state,
35 # allowing us to sort the data on the fly as we need it.
36
37 package require vc::fossil::import::cvs::pass::initcsets ; # Init'ialize C'hange'Sets
38 package require vc::fossil::import::cvs::pass::breakrcycle ; # Break' R'evision Cycle's
39 package require vc::fossil::import::cvs::pass::rtopsort ; # R'evision Top'ological Sort'
 
 
 
 
40 package require vc::fossil::import::cvs::pass::breakscycle ; # Break' S'ymbol Cycle's
41 package require vc::fossil::import::cvs::pass::breakacycle ; # Break' A'll Cycle's
42 package require vc::fossil::import::cvs::pass::atopsort ; # A'll Top'ological Sort'
43
44 # # ## ### ##### ######## ############# #####################
45 ## Support for passes etc.
46
47 package require vc::fossil::import::cvs::option ; # Cmd line parsing & database
48
--- tools/cvs2fossil/lib/pkgIndex.tcl
+++ tools/cvs2fossil/lib/pkgIndex.tcl
@@ -16,12 +16,14 @@
1616
package ifneeded vc::fossil::import::cvs::pass::collrev 1.0 [list source [file join $dir c2f_pcollrev.tcl]]
1717
package ifneeded vc::fossil::import::cvs::pass::collsym 1.0 [list source [file join $dir c2f_pcollsym.tcl]]
1818
package ifneeded vc::fossil::import::cvs::pass::filtersym 1.0 [list source [file join $dir c2f_pfiltersym.tcl]]
1919
package ifneeded vc::fossil::import::cvs::pass::initcsets 1.0 [list source [file join $dir c2f_pinitcsets.tcl]]
2020
package ifneeded vc::fossil::import::cvs::pass::breakrcycle 1.0 [list source [file join $dir c2f_pbreakrcycle.tcl]]
21
+package ifneeded vc::fossil::import::cvs::pass::rtopsort 1.0 [list source [file join $dir c2f_prtopsort.tcl]]
2122
package ifneeded vc::fossil::import::cvs::pass::breakscycle 1.0 [list source [file join $dir c2f_pbreakscycle.tcl]]
2223
package ifneeded vc::fossil::import::cvs::pass::breakacycle 1.0 [list source [file join $dir c2f_pbreakacycle.tcl]]
24
+package ifneeded vc::fossil::import::cvs::pass::atopsort 1.0 [list source [file join $dir c2f_patopsort.tcl]]
2325
package ifneeded vc::fossil::import::cvs::cyclebreaker 1.0 [list source [file join $dir c2f_cyclebreaker.tcl]]
2426
package ifneeded vc::fossil::import::cvs::project 1.0 [list source [file join $dir c2f_project.tcl]]
2527
package ifneeded vc::fossil::import::cvs::project::lodmgr 1.0 [list source [file join $dir c2f_plodmgr.tcl]]
2628
package ifneeded vc::fossil::import::cvs::project::rev 1.0 [list source [file join $dir c2f_prev.tcl]]
2729
package ifneeded vc::fossil::import::cvs::project::revlink 1.0 [list source [file join $dir c2f_prevlink.tcl]]
2830
--- tools/cvs2fossil/lib/pkgIndex.tcl
+++ tools/cvs2fossil/lib/pkgIndex.tcl
@@ -16,12 +16,14 @@
16 package ifneeded vc::fossil::import::cvs::pass::collrev 1.0 [list source [file join $dir c2f_pcollrev.tcl]]
17 package ifneeded vc::fossil::import::cvs::pass::collsym 1.0 [list source [file join $dir c2f_pcollsym.tcl]]
18 package ifneeded vc::fossil::import::cvs::pass::filtersym 1.0 [list source [file join $dir c2f_pfiltersym.tcl]]
19 package ifneeded vc::fossil::import::cvs::pass::initcsets 1.0 [list source [file join $dir c2f_pinitcsets.tcl]]
20 package ifneeded vc::fossil::import::cvs::pass::breakrcycle 1.0 [list source [file join $dir c2f_pbreakrcycle.tcl]]
 
21 package ifneeded vc::fossil::import::cvs::pass::breakscycle 1.0 [list source [file join $dir c2f_pbreakscycle.tcl]]
22 package ifneeded vc::fossil::import::cvs::pass::breakacycle 1.0 [list source [file join $dir c2f_pbreakacycle.tcl]]
 
23 package ifneeded vc::fossil::import::cvs::cyclebreaker 1.0 [list source [file join $dir c2f_cyclebreaker.tcl]]
24 package ifneeded vc::fossil::import::cvs::project 1.0 [list source [file join $dir c2f_project.tcl]]
25 package ifneeded vc::fossil::import::cvs::project::lodmgr 1.0 [list source [file join $dir c2f_plodmgr.tcl]]
26 package ifneeded vc::fossil::import::cvs::project::rev 1.0 [list source [file join $dir c2f_prev.tcl]]
27 package ifneeded vc::fossil::import::cvs::project::revlink 1.0 [list source [file join $dir c2f_prevlink.tcl]]
28
--- tools/cvs2fossil/lib/pkgIndex.tcl
+++ tools/cvs2fossil/lib/pkgIndex.tcl
@@ -16,12 +16,14 @@
16 package ifneeded vc::fossil::import::cvs::pass::collrev 1.0 [list source [file join $dir c2f_pcollrev.tcl]]
17 package ifneeded vc::fossil::import::cvs::pass::collsym 1.0 [list source [file join $dir c2f_pcollsym.tcl]]
18 package ifneeded vc::fossil::import::cvs::pass::filtersym 1.0 [list source [file join $dir c2f_pfiltersym.tcl]]
19 package ifneeded vc::fossil::import::cvs::pass::initcsets 1.0 [list source [file join $dir c2f_pinitcsets.tcl]]
20 package ifneeded vc::fossil::import::cvs::pass::breakrcycle 1.0 [list source [file join $dir c2f_pbreakrcycle.tcl]]
21 package ifneeded vc::fossil::import::cvs::pass::rtopsort 1.0 [list source [file join $dir c2f_prtopsort.tcl]]
22 package ifneeded vc::fossil::import::cvs::pass::breakscycle 1.0 [list source [file join $dir c2f_pbreakscycle.tcl]]
23 package ifneeded vc::fossil::import::cvs::pass::breakacycle 1.0 [list source [file join $dir c2f_pbreakacycle.tcl]]
24 package ifneeded vc::fossil::import::cvs::pass::atopsort 1.0 [list source [file join $dir c2f_patopsort.tcl]]
25 package ifneeded vc::fossil::import::cvs::cyclebreaker 1.0 [list source [file join $dir c2f_cyclebreaker.tcl]]
26 package ifneeded vc::fossil::import::cvs::project 1.0 [list source [file join $dir c2f_project.tcl]]
27 package ifneeded vc::fossil::import::cvs::project::lodmgr 1.0 [list source [file join $dir c2f_plodmgr.tcl]]
28 package ifneeded vc::fossil::import::cvs::project::rev 1.0 [list source [file join $dir c2f_prev.tcl]]
29 package ifneeded vc::fossil::import::cvs::project::revlink 1.0 [list source [file join $dir c2f_prevlink.tcl]]
30

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button